The onTimeRangeRightClicked 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, after the default action has been performed.
DayPilot.Calendar.onTimeRangeRightClicked(args)
args.start (DayPilot.Date) - selection start
args.end (DayPilot.Date) - selection end
args.resource (string | number) - resource id
The default action is configured by DayPilot.Calendar.timeRangeRightClickHandling.
JavaScript
const calendar = new DayPilot.Calendar("dp", {
onTimeRangeRightClicked: args => {
console.log(args.start.toString(), args.end.toString());
},
// ...
});
calendar.init();Angular
<daypilot-calendar [config]="config"></daypilot-calendar>
config: DayPilot.CalendarConfig = {
onTimeRangeRightClicked: args => {
console.log(args.start.toString(), args.end.toString());
},
// ...
};React
<DayPilotCalendar
onTimeRangeRightClicked={onTimeRangeRightClicked}
{/* ... */}
/>const onTimeRangeRightClicked = (args) => {
console.log(args.start.toString(), args.end.toString());
};Vue
<DayPilotCalendar @timeRangeRightClicked="onTimeRangeRightClicked" <!-- ... --> />
const onTimeRangeRightClicked = (args) => {
console.log(args.start.toString(), args.end.toString());
};Time Range Selecting [doc.daypilot.org]
DayPilot.Calendar.onTimeRangeRightClick