The onTaskDoubleClick event handler fires when the user double-clicks a task box in the Gantt Chart, before the default action specified by taskDoubleClickHandling.
The default action can be canceled by calling args.preventDefault().
DayPilot.Gantt.onTaskDoubleClick(args)args.task - DayPilot.Task object representing the task.
args.preventDefault() - cancels the default action.
JavaScript
const gantt = new DayPilot.Gantt("dp", {
taskDoubleClickHandling: "Enabled",
onTaskDoubleClick: (args) => {
DayPilot.Modal.alert("Double-clicked: " + args.task.id());
},
// ...
});
gantt.init();Angular
<daypilot-gantt [config]="config"></daypilot-gantt>config: DayPilot.GanttConfig = {
taskDoubleClickHandling: "Enabled",
onTaskDoubleClick: args => {
DayPilot.Modal.alert("Double-clicked: " + args.task.id());
},
// ...
};React
<DayPilotGantt
taskDoubleClickHandling="Enabled"
onTaskDoubleClick={onTaskDoubleClick}
{/* ... */}
/>const onTaskDoubleClick = (args) => {
DayPilot.Modal.alert("Double-clicked: " + args.task.id());
};Vue
<DayPilotGantt
taskDoubleClickHandling="Enabled"
@taskDoubleClick="onTaskDoubleClick"
<!-- ... -->
/>const onTaskDoubleClick = (args) => {
DayPilot.Modal.alert("Double-clicked: " + args.task.id());
};