0

I am using the dhtmlx scheduler and wanting to add a marked timespan using the addMarkedTimeSpan method as describer here: http://docs.dhtmlx.com/scheduler/api__scheduler_addmarkedtimespan.html

When applying the following:

scheduler.addMarkedTimespan({
    days: new Date('2015-11-21'),
    zones: [12*60, 14*60, 16*60, 17*60],
    css: "medium_lines_section",
    sections: {
        unit: 462
    }
});

scheduler.updateView();

It created a markedTimeSpan for the specific date and time for the unit I am specifying. However, it is also creating one for every week in the scheduler object. So it creates a marked timespan for 2015-11-21, 2015-11- 28, etc despite specifying the exact date and zones to apply the marked TimeSpan to.

Has anyone else experienced this before?

I have tried with the latest and older versions of the libraries with the same result.

Mark Raa
  • 43
  • 1
  • 5
  • Through error checking, this only happens when I add a markedTimeSpan in conjunction with a blockTime. I am using blockTime to show working hours and markedTimeSpan to show fringe off times. Here is an example of the issue: http://docs.dhtmlx.com/scheduler/snippet/57290940 – Mark Raa Nov 21 '15 at 08:37
  • This is apparently a bug in the software itself and not an implementation error. The forum for this can be found at: http://forum.dhtmlx.com/viewtopic.php?f=6&t=49811&p=138072#p138072 – Mark Raa Dec 07 '15 at 07:14

1 Answers1

1

You can also use the {timeLineName}_cell_class event to add custom CSS to your cells. You can check the documentation for this event in this link: {timeLineName}_cell_class.

Here is an exemplante of use:

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