Hi Team,
I want to get the date range of the current view whenever the scheduler component loads and whenever the user changes the view or changes the date by the navigation button (next, prev, date picker). I need to know the start and end date which is visible on the scheduler. I am able to know the view name by using onViewChange callback and default date by using onDateChange which is giving me the default selected date but I want the whole range (start to end), I am using class-based components.
Scenario: Currently selected view is the month view and the default date is in the month of Feb 2023 so I need something which gives me the start date as Jan 29, 2023, and the end date as March 04, 2023.
Just like In the Jquery version of the scheduler, we get the required information by using the following function:
function scheduler_view_range(e) {
var view = e.sender.view();
// The view has:
// A startDate method which returns the start date of the view.
// An endDate method which returns the end date of the view.
$(".console").append("<p>" + kendo.format("view:: start: {0:d}; end: {1:d};", view.startDate(), view.endDate()) + "</p>");
}