Hi Atish,
Greetings from Syncfusion Support.
We have prepared a sample for your requirement ‘maintain previous date on specific condition’ by reducing setting args.cancel to true can be viewed from the following link.
Also we have checked the shared code in which you have checked args.currentView which will be undefined when action type is date. So we have modified that in the above sample to meet your requirement.
navigating: (args: NavigatingEventArgs) => {
if (args.action == "date") {
console.log("navigating");
var weekStartDate = new Date(2021, 0, 18);
var weekEndDate = new Date(2019, 0, 24);
var sObj = document.querySelector(".e-schedule").ej2_instances[0];
if (args.action == "date") {
if (sObj.currentView == "TimelineDay") {
if (
args.currentDate < weekStartDate ||
args.currentDate > weekEndDate
) {
args.cancel = true;
}
}
}
}
}
Please try the above solution and let us know whether if you need any further assistance.
Regards,
Nevitha