Hi,
I am trying to add tasks on saturday and sunday, using work_time and correct_work_item the task
should get readjusted but its is not. following is my code.
gantt.config.xml_date = "%Y,%m,%d";
gantt.config.work_time = true;
gantt.config.correct_work_time = true;
gantt.config.date_grid = "%j-%M-%Y";
gantt.config.scale_unit = "day";
gantt.config.date_scale = "%D, %d";
gantt.config.duration_unit = "day";
gantt.config.step = 1;
gantt.config.scale_height = 20 * 3;
gantt.config.details_on_create = true;
gantt.config.highlight_critical_path = true;
gantt.config.show_progress = true;
gantt.config.skip_off_time = true;
gantt.setWorkTime({hours: [9, 18]});
gantt.config.grid_resize = true;
gantt.config.order_branch = true;
gantt.config.sort = true;
gantt.config.subscales = [
{unit: "month", step: 1, date: "%F, %Y"},
// {unit:"hour", step:1, date:"%H" }
];
gantt.templates.task_cell_class = function(task, date) {
if (!gantt.isWorkTime(date))
return "week_end";
return "";
};
gantt.templates.scale_cell_class = function(date) {
if (date.getDay() === 0 || date.getDay() === 6) {
return "weekend";
}
};
gantt.templates.task_cell_class = function(item, date) {
if (date.getDay() === 0 || date.getDay() === 6) {
return "weekend";
}
};