Set empty value to date column onBeforeSave event


Hi support,
I am using date InlineEditor column. When I clear the value in Date column, I want to set empty value to it.
But now its again set the previous value.

gantt.ext.inlineEditors.attachEvent(“onBeforeSave”, function (state: any) {
if ( state.newValue == null) {
return true;

I added this code snippet , but it didn’t work.




The inline editor returns the previous value of the task, because for the task, start_date and end_date are required parameters. There is no built-in way to set an empty value to the date column, but you can implement it with the unsсheduled tasks which have no dates in Gantt: ;
And when the null value is set in the date column, you need to add the unscheduled property to the task and clear the start_date of the task. In the end, you need to update the task by updateTask method: ;
Please check the example of how it might be implemented:

Clear custom date fields inline editor

Hi ,

actually this column is a custom date column in Gantt. we need to do this without se task unscheduled.



If you have the custom date, so you need to use the date inline editor with specified map_to: "custom_date" property: ;
And when the null value is set in the custom date column, you need to clear the custom_date of the task:

gantt.ext.inlineEditors.attachEvent("onBeforeSave", function (state) {
    let task = gantt.getTask(;
    if (state.columnName == "custom_date" && state.newValue == null) {
        task.custom_date = "";
    return true;

Please check the following snippet: