We need to make use of the hours part of the startDate and endDate fields. While it clearly works out of the box when loading data (say, a task ending at noon will also have its bar end midway in the corresponding date column), the time part of those two fields is not shown in the editor.
This looked like a simple matter at first and I've been able to show a time value in the widget, but it is always midnight. Here, the task ends at noon:
But the widget still shows midnight:
And changing the time value there does not update the task.
Here's the code I used:
new Gantt({
adopt : document.body,
project : project,
columns : [
{ type : 'name', field : 'name', width : 250 }
],
listeners : {
beforeTaskEditShow({ taskEdit, editor }) {
if (!editor.initializedCustomFields) {
editor.widgetMap.startDateField.format = "MM/DD/YYYY HH:mm";
editor.widgetMap.startDateField.keepTime = true;
editor.widgetMap.endDateField.format = "MM/DD/YYYY HH:mm";
editor.widgetMap.endDateField.keepTime = true;
editor.initializedCustomFields = true;
}
}
},
});
Any advice?