How to show week numbers in Vue Calendar
03 Sep 20262 minutes to read
You can enable weekNumber in the Calendar by using the weekNumber property. This displays the week-of-year numbers in a leading column of the Calendar. The default value is false.
<template>
<div id="app">
<div class='wrap'>
<ejs-calendar id='calendar' :weekNumber='weeknumber'></ejs-calendar>
</div>
</div>
</template>
<script setup>
import { CalendarComponent as EjsCalendar } from '@syncfusion/ej2-vue-calendars';
const weeknumber = true;
</script>
<style>
@import "../node_modules/@syncfusion/ej2-base/styles/material.css";
@import "../node_modules/@syncfusion/ej2-buttons/styles/material.css";
@import "../node_modules/@syncfusion/ej2-vue-calendars/styles/material.css";
.wrap {
margin: 0px auto;
max-width: 250px;
}
</style><template>
<div id="app">
<div class='wrap'>
<ejs-calendar id='calendar' :weekNumber='weeknumber'></ejs-calendar>
</div>
</div>
</template>
<script>
import { CalendarComponent } from "@syncfusion/ej2-vue-calendars";
export default {
name: "App",
components: {
'ejs-calendar': CalendarComponent
},
data() {
return {
weeknumber: true
}
}
}
</script>
<style>
@import "../node_modules/@syncfusion/ej2-base/styles/material.css";
@import "../node_modules/@syncfusion/ej2-buttons/styles/material.css";
@import "../node_modules/@syncfusion/ej2-vue-calendars/styles/material.css";
.wrap {
margin: 0px auto;
max-width: 250px;
}
</style>