Hello, I have a enterprise license to use Gantt and i have problems while using it. When i’m navigating in Grid, quickly open/editing (inline) dates from the same task, the Library throws an error of Maximum Call Stack Size Exceeded.
Our code could be find here: DHTMLX Snippets
Hello Marcio,
That issue occurs because you return true in the is_changed function. Because of that, the onBeforeSave event fires each time the task is updated, and it creates an unending loop. You need to return true only if the value is really changed.
For the duration_ editor:
is_changed: function (value, id, column, node) {
var input = this.get_input(node);
var actual_value = parseInt(input.value.match(/\d+/)[0]) * 8
return actual_value !== value;
},
Thanks for the help Ramil.
When i am using the end date, i has the same problem occuring between the start and end dates columns. For my custom dates columns, the problem is occuring too. Can you help me again ? I change the columns that were hide ‘true’ to ‘false’. http://snippet.dhtmlx.com/5/b0fc82284
Hello Marcio,
The issue with the end_date inline editor occurs because you modify the values in the onBeforeSave event handler. And you do that to make the date look inclusive. It is not recommended to modify the dates as it may not work correctly with auto-scheduling or some other Gantt features.
It is better to create a custom inline editor to modify the end_date parameter. By using it, you can change the displayed and entered date without actually changing the value in the HTML element.
Here is a simple example with inclusive dates: https://snippet.dhtmlx.com/5/2fc90812a
As you use the hour duration unit, you don’t even need to modify the dates.
You can use custom date editors and modify the dates only after the inline editor is closed.
Here is an example with the date input type: http://snippet.dhtmlx.com/5/1b2d12c95
Here we need to modify the dates because the input element with the date type doesn’t have the hour values.
Here is another example with the datetime-local input type: http://snippet.dhtmlx.com/5/c4f4b19aa
The input element may take more space, but it will store the dates more accurately.