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.
Declaration
DayPilot.Month.onEventRightClick(args)Parameters
args.e(DayPilot.Event) - the event referenceargs.preventDefault()- cancels the default action
Notes
In DayPilot.Month.api = 1 mode, the legacy signature is onEventRightClick(e), where e is the DayPilot.Event reference.
Examples
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();
}
};See Also
DayPilot.Month.onEventRightClicked
DayPilot.Month.eventRightClickHandling
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot