The onTimeRangeRightClick event handler fires in the JavaScript Calendar component when the user right-clicks an existing time range selection, or creates a selection using the right mouse button, before the default action is performed.
Declaration
DayPilot.Calendar.onTimeRangeRightClick(args)
Parameters
args.start(DayPilot.Date) - selection startargs.end(DayPilot.Date) - selection endargs.resource(string | number) - resource idargs.preventDefault()- cancels the default action
Notes
The default action is configured by DayPilot.Calendar.timeRangeRightClickHandling.
Examples
JavaScript
const calendar = new DayPilot.Calendar("dp", {
onTimeRangeRightClick: args => {
args.preventDefault();
},
// ...
});
calendar.init();Angular
<daypilot-calendar [config]="config"></daypilot-calendar>
config: DayPilot.CalendarConfig = {
onTimeRangeRightClick: args => {
args.preventDefault();
},
// ...
};React
<DayPilotCalendar
onTimeRangeRightClick={onTimeRangeRightClick}
{/* ... */}
/>const onTimeRangeRightClick = (args) => {
args.preventDefault();
};Vue
<DayPilotCalendar @timeRangeRightClick="onTimeRangeRightClick" <!-- ... --> />
const onTimeRangeRightClick = (args) => {
args.preventDefault();
};See Also
Time Range Selecting [doc.daypilot.org]
DayPilot.Calendar.onTimeRangeRightClicked
DayPilot.Calendar.timeRangeRightClickHandling
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot