The onEventClick event handler is fired by the JavaScript Calendar component when a user clicks a calendar event, before the default action (the default action can be set using the eventClickHandling property).
See also onEventClicked.
DayPilot.Calendar.onEventClick(args)
args.e
(DayPilot.Event) - the event reference
args.ctrl
(boolean) - Ctrl key status
args.meta
(boolean) - Meta key status
args.shift
(boolean) - Shift key status (available since 2023.4.5773)
args.originalEvent
- original event click object (MouseEvent)
args.preventDefault()
- cancels the default action
{
eventClickHandling: "Edit",
onEventClick: (args) => {
if (args.e.tag("disabled")) {
args.preventDefault();
}
},
// ...
}
DayPilot.Calendar.onEventClick(e)
e (DayPilot.Event) - the event reference