updateView
Description
显示指定的视图和日期,但不触发任何事件
updateView: (date?: Date, view?: string) => void
Parameters
date- (optional) Date - (可选)要设置的日期view- (optional) string - (可选)视图名称
Example
// 刷新当前视图和日期,但不做任何更改
scheduler.updateView();
// 在当前视图中显示2012年7月4日
scheduler.updateView(new Date(2012,7,4));
// 在“week”视图中显示2012年5月3日
scheduler.updateView(new Date(2012,5,3), "week");
Related samples
Details
- 调用此函数而不传入任何参数,仅刷新当前视图。
- 默认视图名称为 'day'、'week' 和 'month'。若要使用其他视图,请提供其name参数。
- 此方法与 setCurrentView 类似。主要区别是,setCurrentView 会触发 onBeforeViewChange 和 onViewChange 事件,而 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.