Drag and Drop Task Moving between Two Gantt Charts

In the JavaScript Gantt Chart component, it is possible to move tasks to another Gantt Chart instance by dragging a row.

Available since version 2024.4.6270.

Detecting a Task Dragged from Another Gantt Chart

When the task is dropped in the target Gantt Chart, it fires the standard onRowMove and onRowMoved events.

You can detect an external source by checking the args.external property.

The DayPilot.Gantt instance representing the source Gantt Chart can be accessed using args.source.calendar property.

onRowMove: args => {
  const sourceGanttChart = args.source.calendar;
  console.log("The task was dragged from ${sourceGanttChart.id}").
}

Demo