Hello,
The default start date for newly created tasks not showing the current date but of 1 day before.
Please check the snippet: https://snippet.dhtmlx.com/wv5fivu1
Lets say; the gantt chart is empty and I am starting to create tasks, and in that case the default start date should be the day that I created not 1 day before.
Thanks.
ramil
December 14, 2022, 12:01pm
2
Hello Thomas,
I added it as a bug to our internal bug tracker. The dev team will fix it in the future, but I cannot give you any ETA.
For now, you need to implement a custom solution by using the Gantt API and Javascript.
To make it work for the inline editors, you need to modify the value in the onEditStart event handler:
gantt.ext.inlineEditors.attachEvent("onEditStart", function(state){
if (state.columnName == "start_date" && gantt.getTaskCount() == 1){
gantt.ext.inlineEditors.getState().placeholder.firstChild.firstChild.value = gantt.date.date_to_str("%Y-%m-%d")(new Date())
}
});
To make it work in the lightbox, you need to modify the onTaskCreated event handler:
gantt.attachEvent("onTaskCreated", function (task) {
if (gantt.getTaskCount() == 1){
task.start_date = new Date();
}
return true;
});
Here is the updated snippet:
https://snippet.dhtmlx.com/6of0hf9h
ramil
June 25, 2026, 6:06am
3
Hello,
The issue was fixed in the 10.0 version. You can check that it is no longer reproduced in the following snippet:
Here is the list of other changes: