跳转到主要内容

event_class

Description

定义将添加到事件容器的CSS类

event_class: (start: Date, end: Date, ev: any) => string

Parameters

  • start - (required) Date - 事件开始的日期
  • end - (required) Date - 事件结束的日期
  • ev - (required) object - 事件对象

Returns

  • css_class - (string) - 对应元素的CSS类名

Example

scheduler.templates.event_class = function(start,end,ev){
return "";
};

Applicable views: Day view, Month view, Week view, Year view, Units view, Timeline view

Details

对于Timeline视图,该模板仅在"Bar"和"Tree"模式下使用。

有关自定义事件颜色的详细指导,请参阅相关文档 Custom Event's Color

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.