showEvent
Description
在当前视图或指定视图中显示并高亮指定的事件
showEvent: (id: string, view?: string) => void
Parameters
id- (required) string - 事件的idview- (optional) string - 视图名称
Example
```js
// 在“week”视图中显示id为someId的事件
scheduler.showEvent(someId, "week");
// 在当前激活的视图中显示id为someId的事件
scheduler.showEvent(someId);
```
Related samples
Details
- 默认的视图名称包括 'day'、'week' 和 'month'。如果想使用其他视图,请传入对应的name参数。
- 此方法会触发 onBeforeEventDisplay 和 onAfterEventDisplay 事件。
例如,在程序中添加一个新事件后,可以这样在scheduler中显示它:
var eventId = scheduler.addEvent({
start_date: "08-06-2013 09:00",
end_date: "08-06-2013 11:00",
text: "Meeting"
});
...
scheduler.showEvent(eventId);
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.