Currently after a certain number of tasks have been added, we switch to a the static background. On the non static background we add the highlight with the following code:
[code] gantt.config.scale_unit = “week”;
gantt.config.date_scale = “%d-%M-%Y”;
gantt.config.step = 1;
gantt.config.subscales = [
{ unit: "day", step: 1, date: "%k", css: template }
];
var template = function (date) {
var classNames = "";
if (!gantt.isWorkTime(date)) {
classNames = "nonWorkDay ";
}
if (today.getFullYear() == date.getFullYear() && today.getMonth() == date.getMonth() && today.getDate() == date.getDate()) {
classNames += "today";
}
return classNames;
};
gantt.templates.task_cell_class = function (item, date) {
var classNames = "";
if (!gantt.isWorkTime(date)) {
classNames = "nonWorkDay ";
}
if (today.getFullYear() == date.getFullYear() && today.getMonth() == date.getMonth() && today.getDate() == date.getDate()) {
classNames += "today";
}
return classNames;
};[/code]
Giving us the result:
Is there anyway to get this to work with the static background?