The onTaskClick event is fired by the JavaScript Gantt Chart component when the user clicks a task box, before the default default action specified by the taskClickHandling property.
The default action can be canceled by calling args.preventDefault().
args.task - holds a DayPilot.Task object representing the task
args.preventDefault() - cancels the default action
Gantt Chart config:
{
onTaskClick: (args) => {
DayPilot.Moal.alert("Clicked: " + args.task.id());
}
}