To edit Gantt Chart tasks, you can use the following options:
-
Use the row header inline editing mode.
-
Open a modal dialog with task details, triggered by either the onRowClick or onTaskClick event (or both).
Example: Open a Modal Dialog
Gantt Chart config:
{
onTaskClick: async (args) => {
const form = [
{name: "Name", id: "text"},
{name: "Start", id: "start", type: "date"},
{name: "End", id: "end", type: "date"},
];
const modal = await DayPilot.Modal.form(form, args.task.data);
if (modal.canceled) {
return;
}
gantt.tasks.update(modal.result);
}
// ...
}