Resource controls with Calendars

Hi, I’m trying to implement the calendars resources with multi select resource for a task, but i don’t use the normal multiSelect in the lightBox, I use the resource controls with the possibility to set the workload for a task. This don’t work and it doesn’t assigned the resource calendar at the task (also with only one resource selected). I tried the same code but with multiselect and work good. But i need the resource control for my project. is it possible the gantt doesn’t accept calenders and Resource controls togheter?
can you help me?

Best regards.
Francesco.

Hello Francesco,
Each task can have only one calendar. If you use resource calendars and assign several resources to a single task, it means that you try to set several calendars to it. You need to merge all these calendars and assign the new calendar to the task.

You can enable the dynamic_resource_calendars config that tells Gantt to merge several resource calendars into one automatically:
https://docs.dhtmlx.com/gantt/api__gantt_dynamic_resource_calendars_config.html

You can check how it works in the following snippet:

If that doesn’t help you, probably, the issue is related to the Gantt configuration, but it is hard to suggest what might be wrong as I don’t see your code.

In that case, please add your configuration to the following snippet and make sure that the issue is reproduced there:

Then, click on the Save button and send me the link.
Or send me a ready demo with all the necessary JavaScript and CSS files so that I can reproduce the issue locally.

Thanks Ramil for your quick response.
With the dynamic_resource_calendars config work good. Now I have a strange issue when assign the resources at task, it set and merge right the calendars and move the task in a right cell. But the task duration set to zero. I tried my data (task, resources and calendars) with your sample and work right.
My project is in angular.

Thanks so much.

Hello Francesco,
It seems that the issue occurs only with the test resource as when I assign different resources, the task duration is not changed.

I was able to find a way to reproduce the issue with the simplest configuration:
https://snippet.dhtmlx.com/u088tcxf

It seems that if the resources section is below the duration section, then task date is not set correctly. In the snippet I shared, the resources section is above the duration section, so it works correctly.

I will add it as a bug to our internal bug tracker. The dev team will fix it in the future, but I cannot give you any ETA.

As a workaround, you can put the resources section above the duration section.

Thank you Ramil for your disponibility.