Function gantt.parse() modifies tasks object parameter

I notice that the gantt.parse(tasks) function modifies the tasks object, e.g. the date strings are converted into date objects as well as a bunch of internal $values being added.

Wouldn’t it be more proper to clone the task and save it internally?

The problem is that in my application, I am updating my tasks object and calling the gantt.parse(tasks) function again, which runs into occasional problems when re-displaying the gantt chart.

For example, a given task first has no start_date and then later I pass it in again with a start_date defined.


Scheduler does use events from parsed data object. Unfortunately, currently there is no way to avoid such behaviour.
Maybe you could try to edit your events in scheduler.
If it doesn’t work in your case, you could try to copy your events before calling parse function.