Hi,
I am using a evaluation version of Gantt chart and having an issue when the end_date is a weekend date.
My column config :
gantt.config.columns = [
{name:“text”, label:“Task name”, width:"", tree:true },
{name:“start_time”, label:“Start time”, template:function(obj){
return gantt.templates.date_grid(obj.start_date);
}, align: “center”, width:80 },
{name:“end_time”, label:“End time”, template:function(obj){
var end_date = gantt.calculateEndDate(obj.start_date, obj.duration, “day”);
var day = end_date.getDay();
if (day == 6) end_date.setDate(end_date.getDate() + 2);
if (day == 0) end_date.setDate(end_date.getDate() + 1);
return gantt.templates.date_grid(end_date);
}, align: “center”, width:80 },
{name:“duration”, label:“Task name”, width:"", tree:true },
];
gantt.config.auto_scheduling = true;
gantt.config.auto_scheduling_strict = true;
gantt.config.auto_scheduling_initial = false;
gantt.config.work_time = true;
gantt.config.correct_work_time = true;
for eg : if I move end date of Task 1 by one day. Then I would like the dependent tasks also to move by 1 day. That works fine. But if the dependent end_date is a weekend then I would like the end_date to be the following monday.
My Task1 dates - 2015-05-05 2015-05-05 duration : 0 days
Task 2 dates : 2016-06-13 2016-06-17 duration : 4 days
I change my Task1 end date to 2015-05-06
then my dependent Task2’s dates become 2016-06-14 2016-06-21
Task2’s end date should have been 2016-06-20 but not sure why it comes out as 2016-06-21.
Could you pls. help …am I missing something in setting of work_time properties ?