Reputation: 53
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.
Upvotes: 0
Views: 922
Reputation: 17
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 "";
}
Upvotes: 1