setCurrentView
Description
显示所选的视图和日期
setCurrentView: (date?: Date, view?: string) => void
Parameters
date- (optional) Date - 要显示的日期view- (optional) string - 要显示的视图名称
Example
// 刷新当前视图和日期,不做任何更改
scheduler.setCurrentView();
// 显示当前视图中的2012年7月4日
scheduler.setCurrentView(new Date(2012,7,4));
// 在周视图中显示2012年5月3日
scheduler.setCurrentView(new Date(2012,5,3), "week");
Related samples
Details
- 默认视图名称包括"day","week"和"month"。对于其他任何视图,请使用其name参数。
- 调用此方法会触发 onBeforeViewChange 和 onViewChange 事件。
- 此方法类似于 updateView,但关键区别在于 updateView 不会触发任何事件。
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.