Templates.event_class

Hi,

I would like modify templates.event_class if the start date is different of the date of the event.

Like this:

scheduler.templates.event_class=function(start, end, event){

var css = "";
if (event.calendar_start_date != date.getDate()) {
css + = " dhx_body_hash";
}

return css; // default return
};

Hi,

Please clarify what are the difficulties?

Hi,

https://docs.dhtmlx.com/scheduler/week_view_templates.html

I would like to applied a CSS class to the event’s container (scheduler.templates.event_class)

This class would be applied if the event’s start_date is different from the date of the week
if (event.calendar_start_date != date.getDate())

However, we do not know how to get the date of the week parameter (date.getDate) in “event_class”

Hi,

There is the method getState() to get the current state of the scheduler. Please check its properties on the page
https://docs.dhtmlx.com/scheduler/api__scheduler_getstate.html