The onEventRightClick event handler fires when the user right-clicks an event in the monthly calendar.
This event is fired before the default action specified by eventRightClickHandling. You can call args.preventDefault() to cancel that action.
See also DayPilot.Month.onEventRightClicked, which fires after the default action.
DayPilot.Month.onEventRightClick(args)args.e (DayPilot.Event) - the event reference
args.preventDefault() - cancels the default action
In DayPilot.Month.api = 1 mode, the legacy signature is onEventRightClick(e), where e is the DayPilot.Event reference.
JavaScript
const dp = new DayPilot.Month("dp", {
onEventRightClick: (args) => {
if (args.e.id() === "3") {
args.preventDefault();
}
},
// ...
});
dp.init();Angular
<daypilot-month [config]="config"></daypilot-month>config: DayPilot.MonthConfig = {
onEventRightClick: (args) => {
if (args.e.id() === "3") {
args.preventDefault();
}
},
// ...
};React
<DayPilotMonth
onEventRightClick={onEventRightClick}
{/* ... */}
/>const onEventRightClick = (args) => {
if (args.e.id() === "3") {
args.preventDefault();
}
};Vue
<DayPilotMonth
@eventRightClick="onEventRightClick"
<!-- ... -->
/>const onEventRightClick = (args) => {
if (args.e.id() === "3") {
args.preventDefault();
}
};DayPilot.Month.onEventRightClicked