Consolidation of a person's specific holidays

Hi,

I would like to have the ability to reflect individual specific holidays on the Gantt chart.
For example, if John is going on vacation next Wednesday, I would like this information to be reflected in the project’s Gantt chart and automatically skip the task on holiday.

Kenji.

Hello,
You can define a set of working calendars that can be assigned to a specific user. Please check the article about it:
https://docs.dhtmlx.com/gantt/api__gantt_resource_calendars_config.html ;
To highlight the weekends in the timeline area, you can use timeline_cell_class template:
https://docs.dhtmlx.com/gantt/api__gantt_timeline_cell_class_template.html ;
And here is an example:
https://docs.dhtmlx.com/gantt/samples/09_worktime/07_resource_calendars.html

Thank you for your reply.
Your proposal will be the same schedule every week.
But what I want to solve is not “calendar for specific resource” but “specific holiday for specific resource”.
For example John gets paid for Resource A on September 1st and September 10th.
I want this reflected in the project calendar.

Hello,
One of the options is to assign holidays or days-off through the array of dates.
You need to use the getCalendar with the setWorkTime methods to add the required days for the certain user calendar:
https://docs.dhtmlx.com/gantt/api__gantt_getcalendar.html ;
https://docs.dhtmlx.com/gantt/api__gantt_setworktime.html ;
Please check the example of how it might be implemented:
https://snippet.dhtmlx.com/corjy06y ;
Another option is to use setWorkTime method with customWeeks attribute:
https://docs.dhtmlx.com/gantt/api__gantt_setworktime.html#:~:text=}%3B-,customWeeks,-an%20object%20with ;
Please check the example:
https://snippet.dhtmlx.com/otz3poof ;