Hi, perhaps this is intended functionality for reasons I'm not understanding, but when navigating within a Kendo Scheduler that has certain view types set (particularly, "week" for my purpose), the date that's received in the "navigate" event handler is inconsistent depending on which direction navigation is performed.
When navigating forward, the e.date value is that of the first day of the currently displayed week, as I would expect. However, when navigating backward, the e.date value is the last day of the displayed week. Is there a reason that the day of week for the event date is not the same regardless of which direction navigation is performed?
The console output of this Dojo exhibits the date discrepancy: https://dojo.telerik.com/eMEtuhAQ/2
Thanks!
Hi J A,
This behavior is by design so. When the user navigates forward the selected date is always the first date from the current view and when they do backward the selected day is always the last date of the view.
You can overcome this by removing the desired number of days when the action is previous:
navigate: function(e) { var date = e.date if(e.action == "previous") { date = new Date(e.date.setDate(e.date.getDate() - 6)) } console.log("date", date); }
Dojo demo: https://dojo.telerik.com/ixOlUKOB
Regards,
Nikolay
Hi JA,
Yes, this is expected and you can go with this approach.
Please let us know if anything new arises.
Regards,
Nikolay