Auto set start date based on predecessor



We are using DHTMLX Gantt with Angular and we need to auto adjust start date of a task, based on the predecessor of the task.


Consider that there are two tasks as follows.

1 Task A: 12/05/2022 - 18/05/2022

2 Task B: 23/05/2022 - 30/05/2022

If the user adds 1 against the predecessor field in 2nd task, then the system will adjust the start date of Task B based on the constraint that is set for the task.

  1. If the constraint for Task B is set as Start No Earlier Than 23/05/2022, then the system will not update the start date of that task when the user adds a predecessor to it.

  2. If there are no constraints of Task B, then the system will update the start date of the task B to 19/05/2022 (next available date after the end date of Task A).

Is there anyway to configure this in DHTMLX Gantt.

Thank you.

Kind regards,
Madhuka Lakshan.


There is auto_scheduling extension that gives Gantt the ability to schedule tasks automatically depending on relations between them: ;
Gantt provides the possibility to set additional time constraints for tasks: ;
Gantt has several types of time constraints, and one of them is exactly what you want: Start no earlier than – the task should start on the specified date or after it.
Please check the example with all types of constraints in Gantt: ;
And here is the demo of how it might be implemented in angular (choose the required constraint type for the tasks and create link): ;
If you want auto-planning to work based on task dates and relations only, ignoring constraints, you can use gantt.config.auto_scheduling_compatibility config with true value.
Here related article:


Thank you Артём for the reply.