updateView
Description
显示指定的视图和日期(不触发任何事件)
updateView: (date?: Date, view?: string) => void
Parameters
date- (optional) Date - 要设置的日期view- (optional) string - 视图名称
Example
// 显示当前视图和日期。仅刷新,不改变任何内容
scheduler.updateView();
// 在当前活动视图中显示 2027-08-04
scheduler.updateView(new Date(2027, 7, 4));
// 在周视图中显示 2027-06-03
scheduler.updateView(new Date(2027, 5, 3), "week");
Related samples
Details
- 不带参数调用时,该函数将仅刷新当前视图。
- 默认视图的名称为 'day', 'week', 'month'。要指定其他视图,请使用它的
name参数。 - 此方法类似于
setCurrentView()。唯一的区别是,与updateView()不同,setCurrentView()会触发onBeforeViewChange和onViewChange事件。
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.