DayPilot.Month.onEventClicked

The onEventClicked event handler fires when the user clicks an event in the monthly calendar, after the default action configured by DayPilot.Month.eventClickHandling has been performed.

Declaration

DayPilot.Month.onEventClicked(args)

Parameters

  • args.control - Month control instance

  • args.e (DayPilot.Event) - clicked event reference

  • args.div - event <div> element

  • args.ctrl (boolean) - Ctrl key status

  • args.meta (boolean) - Meta key status

  • args.originalEvent - original browser click event

Notes

Use this handler to react after the built-in click action has completed. If you need to cancel or replace the default action before it runs, handle DayPilot.Month.onEventClick instead.

Examples

JavaScript

const month = new DayPilot.Month("dp", {
  onEventClicked: (args) => {
    alert("Event clicked: " + args.e.text());
  },
  // ...
});
month.init();

Angular

<daypilot-month [config]="config"></daypilot-month>
config: DayPilot.MonthConfig = {
  onEventClicked: (args) => {
    alert("Event clicked: " + args.e.text());
  },
  // ...
};

React

<DayPilotMonth
  onEventClicked={onEventClicked}
  {/* ... */}
/>
const onEventClicked = (args) => {
  alert("Event clicked: " + args.e.text());
};

Vue

<DayPilotMonth
  @eventClicked="onEventClicked"
  <!-- ... -->
/>
const onEventClicked = (args) => {
  alert("Event clicked: " + args.e.text());
};

See Also

DayPilot.Month.onEventClick

DayPilot.Month.eventClickHandling

DayPilot.Month Class

Availability

Availability of this API item in DayPilot editions:

LitePro
DayPilot for JavaScript