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 instanceargs.e(DayPilot.Event) - clicked event referenceargs.div- event<div>elementargs.ctrl(boolean) - Ctrl key statusargs.meta(boolean) - Meta key statusargs.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.eventClickHandling
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot