Resource working time with dates and hours



I’m trying to set the working times of resources based on multiple combinations of dates and hours.

I would like to do something like this:
var testCal = gantt.addCalendar({
worktime: {
dates: [new Date(2019, 4, 13), [6, 22]]

This would set the 13th of May between 06:00 and 22:00 as working time.

Does anyone know if this is possible with dhtmlx?


Yes, it is possible to do that.
First, you need to create the calendar:


Then you can use the setWorkTime method to specify the date and an array with hours:

  date:new Date(2018,03,02), 

You can read more about that method in the following article:
Here is an example of how it might be implemented: