setCurrentView
Description
Displays the specified view and date
setCurrentView: (date?: Date, view?: string) => void
Parameters
date- (optional) Date - the date to displayview- (optional) string - the name of a view to display
Example
// displays the current view and date. Doesn't change anything, just refreshes
scheduler.setCurrentView();
// displays 2027-08-04 in the currently active view
scheduler.setCurrentView(new Date(2027, 7, 4));
// displays 2027-06-03 in the Week view
scheduler.setCurrentView(new Date(2027, 5, 3), "week");
Related samples
Details
- The names for default views are 'day', 'week', 'month'. To specify any other view, use its
nameparameter. - The method invokes
onBeforeViewChangeandonViewChange. - The method is similar to
updateView(). The only difference is thatupdateView()doesn't generate any events.
Related API
Need help?
Got a question about the documentation? Reach out to our technical support team for help and guidance. For custom component solutions, visit the Services page.