The onEventRightClicked event handler fires when the user clicks a calendar event using the right mouse button in the JavaScript Calendar component, after the default action configured by DayPilot.Calendar.eventRightClickHandling has been performed.
DayPilot.Calendar.onEventRightClicked(args)args.e (DayPilot.Event) - object representing the clicked event
Use DayPilot.Calendar.onEventRightClick when you need to intercept the right-click before the default action runs.
JavaScript
const calendar = new DayPilot.Calendar("dp", {
onEventRightClicked: (args) => {
DayPilot.Modal.alert("Event clicked: " + args.e.text());
},
// ...
});
calendar.init();Angular
<daypilot-calendar [config]="config"></daypilot-calendar>config: DayPilot.CalendarConfig = {
onEventRightClicked: (args) => {
DayPilot.Modal.alert("Event clicked: " + args.e.text());
},
// ...
};React
<DayPilotCalendar
onEventRightClicked={onEventRightClicked}
{/* ... */}
/>const onEventRightClicked = (args) => {
DayPilot.Modal.alert("Event clicked: " + args.e.text());
};Vue
<DayPilotCalendar
@eventRightClicked="onEventRightClicked"
<!-- ... -->
/>const onEventRightClicked = (args) => {
DayPilot.Modal.alert("Event clicked: " + args.e.text());
};DayPilot.Calendar.eventRightClickHandling