DayPilot.Calendar.onEventClick

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.

Declaration

DayPilot.Calendar.onEventClick(args)

Parameters

  • 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

Example

{
  eventClickHandling: "Edit",
  onEventClick: (args) => {
    if (args.e.tag("disabled")) {
      args.preventDefault();
    }
  },
  // ...
}

api=1

Declaration

DayPilot.Calendar.onEventClick(e)

Parameters