Dhtmlx gantt changes project start date automatically

558 views Asked by At

So I have this scenario with a screen like below:

DHTMLX gantt chart

The DHTMLX Gantt automatically changes the project start date to default to the first day of the Gantt chart if there are no children tasks. In this case, Phase 3 takes the start date from its sibling Phase 1 i.e Jan 29.

How can I stop this default behavior?

1

There are 1 answers

0
gearcoded On

The tasks with the project type rely on the dates of their children. If there are no child tasks, projects obtain the dates from other tasks or from the current date. You can read more about project tasks here:

https://docs.dhtmlx.com/gantt/desktop__task_types.html#projecttasks

Right now, there is no way to set custom dates for project tasks without children.

You can enable the auto_types parameter to dynamically change the task type:

https://docs.dhtmlx.com/gantt/api__gantt_auto_types_config.html

If a task has a child task, it will become a project task. Projects without child tasks will become regular tasks. You can check how it works in the following sample:

https://docs.dhtmlx.com/gantt/samples/04_customization/19_task_type.html