Skip to main content

event_class

Description​

Specifies the CSS class that will be applied to the event's container

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

Parameters​

  • start - (required) Date - the date when an event is scheduled to begin
  • end - (required) Date - the date when an event is scheduled to be completed
  • ev - (required) object - the event's object

Returns​

  • css_class - (string) - the CSS class for the related element

Example​

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

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

Details​

In the Timeline view, the template is applied to 'Bar' and 'Tree' modes only.

Check the full information about customizing event colors in the related article 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.