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.
DayPilot.Calendar.onTimeRangeRightClick(args)
args.start (DayPilot.Date) - selection start
args.end (DayPilot.Date) - selection end
args.resource (string | number) - resource id
args.preventDefault() - cancels the default action
The default action is configured by DayPilot.Calendar.timeRangeRightClickHandling.
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();
};Time Range Selecting [doc.daypilot.org]
DayPilot.Calendar.onTimeRangeRightClicked