Having a problem with calculation of endDate and duration of a task


Uppon creating/editing a existing task, ( which the information came from a database, and then turned into JSON. ) The duration of the tasks changes to a different incorrect value.
Because of it, when editing the start_date, the calculation of the end_date is wrong (usually only adding 1 hour)
I honestly don’t know what could be causing this, the only time the calculation of the enddate is done correctly, it’s when I created a brand new task, put the hours, and then select a start_date, and even then, after editing afterwards,
the duration is set to 1 again.

Is there any configuration I set wrong?


Hello Eduardo,
Probably, the issue is related to Gantt configuration, but it is hard to suggest what might be wrong as I don’t see your code.
Please, reproduce the issue in the snippet, then click on the “Share” 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.