Hello @Kevin_Tian ,
You should be able to make all Saturdays/Sundays or the specific weekend as working:
This fragment will make all Saturdays as working days:
gantt.setWorkTime({day : 6});
Demo all working Saturdays:
http://snippet.dhtmlx.com/5/97e931e41
And this one should make the specific weekend a working day(Sunday 08):
gantt.setWorkTime({date : new Date(2018, 3, 08)});
Demo:
http://snippet.dhtmlx.com/5/7670229de
It may not work in your case if you are using not a global worktime calendar, but task/resource
level calendars:
https://docs.dhtmlx.com/gantt/desktop__working_time.html#assigningcalendartotask
In this case, you should change work time for these calendars, instead of changing global settings:
Example with task level calendar:
gantt.addCalendar({
id:"custom", // optional
worktime: {
hours: ["8:00-17:00"],
days: [ 0, 0, 1, 1, 1, 1 ,0]
}
});
var calendar = gantt.getCalendar("custom");
calendar.setWorkTime({date : new Date(2018, 3, 08)});
Demo:
http://snippet.dhtmlx.com/5/911408952
If it’s not your case, could you please provide more details on how to reproduce your issue, or reproduce it in our snippet tool(open the demo above => reproduce the issue on “HTML/CODE/DATA” tabs => click the “Share” button) and post here the new link?