onActionBegin: function (args) {
if (args.requestType === "toolbarItemRendering") {
args.items[2].click = this.onCalendarCreated.bind(this);
}
},
onCalendarCreated: function () {
setTimeout((e) => {
let container = document.querySelector(".e-schedule-toolbar-container");
let calendar = container.querySelector(".e-calendar");
if (calendar) {
document.querySelector(
".e-calendar"
).ej2_instances[0].weekNumber = true;
}
}, 1);
}, |
weekRule property possible values |
Description |
FirstDay |
Set the first week of the year's week number to be started from 1. Then it followed as 1, 2, 3 ... |
FirstFullWeek |
Set the first week of the year's week number to be started from 52 or 53 (i.e December last week's week Number). Then it followed as 53, 1, 2 … |
FirstFourDayWeek |
Set the week number based on the majority of dates present in the week for the respected months. If January dates are presented in the week more than December, the first week of the year's week number will be started from 1. If December dates are presented in the week more than January, the first week of the year's week number will be started from 52 or 53. |
onCalendarCreated: function () {
setTimeout((e) => {
let container = document.querySelector(".e-schedule-toolbar-container");
let calendar = container.querySelector(".e-calendar");
if (calendar) {
document.querySelector(
".e-calendar"
).ej2_instances[0].weekNumber = true;
document.querySelector(".e-calendar").ej2_instances[0].weekRule =
"FirstFourDayWeek";
}
}, 1);
}, |
return {
firstDay: 1,
selectedDate: new Date(2019, 0, 10),
}; |