1

I like to ask if DHTMLX Scheduler can "HIGHLIGHT" or "MARK" hours .

Because it only allow me to hightlight whole day.

scheduler.addMarkedTimespan({start_date: new Date(2018,02,19), end_date: new Date(2018,02,20), css: "yellow_section" });

I am tying to do is show a hour RANGE in which represent like a employeee working hours.

Sample is like this

enter image description here

enter image description here

Dave
  • 193
  • 1
  • 19

1 Answers1

0

You can use the {timeLineName}_cell_class event to add custom CSS to your cells based on a condition. You can find the documentation for this event here.

Here's an example where I use it to add a css class to all cells of determined day, but you can change the condition to add custom CSS to determined hours range:

scheduler.templates.MyScheduler_cell_class = function(evs, date, section){
    //---- change the condition in the line bellow ----
    if (date.valueOf() == new Date('2015-11-21').valueOf()){ 
        return "custom-css-class-here";
    }
    return "";
}