跳转到主要内容

render

Description​

刷新scheduler显示

render: (date?: Date, view?: string) => void

Parameters​

  • date - (optional) Date - 要显示的日期
  • view - (optional) string - 要切换到的视图名称

Example​

// 使用新配置更新布局
scheduler.config.hour_size_px = 88;
scheduler.render();


// 切换到不同日期
scheduler.render(new Date(2027,7,4));

// 切换到不同视图
scheduler.render(null, "week");

Details​

此方法是 scheduler.setCurrentView 的别名,功能相同。

  • 默认视图名称包括 'day'、'week' 和 'month'。对于其他视图,请使用它们的 name 参数。
  • 调用此方法会触发 onBeforeViewChange 和 onViewChange 事件。
  • 它类似于 updateView,但关键区别在于 updateView 不会触发任何事件。
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.