The onTimeRangeRightClicked event handler fires when the user right-clicks an existing time range selection in the JavaScript Scheduler component, after the default action configured by timeRangeRightClickHandling has been performed.
Declaration
DayPilot.Scheduler.onTimeRangeRightClicked(args)Parameters
args.start(DayPilot.Date) - selection startargs.end(DayPilot.Date) - selection endargs.resource(string | number) - selection resource idargs.alt(boolean) -trueif the Ctrl key was pressed (since 2026.2.6911)args.ctrl(boolean) -trueif the Ctrl key was pressedargs.meta(boolean) -trueif the Meta key was pressedargs.shift(boolean) -trueif the Shift key was pressed
Notes
Right-clicking an unselected grid cell fires DayPilot.Scheduler.onTimeRangeSelect and DayPilot.Scheduler.onTimeRangeSelected instead.
Examples
JavaScript
const dp = new DayPilot.Scheduler("dp", {
onTimeRangeRightClicked: (args) => {
console.log(args.start.toString(), args.end.toString(), args.resource);
},
// ...
});
dp.init();Angular
<daypilot-scheduler [config]="config"></daypilot-scheduler>config: DayPilot.SchedulerConfig = {
onTimeRangeRightClicked: (args) => {
console.log(args.start.toString(), args.end.toString(), args.resource);
},
// ...
};React
<DayPilotScheduler
onTimeRangeRightClicked={onTimeRangeRightClicked}
{/* ... */}
/>const onTimeRangeRightClicked = (args) => {
console.log(args.start.toString(), args.end.toString(), args.resource);
};Vue
<DayPilotScheduler
@timeRangeRightClicked="onTimeRangeRightClicked"
<!-- ... -->
/>const onTimeRangeRightClicked = (args) => {
console.log(args.start.toString(), args.end.toString(), args.resource);
};See Also
Time Range Selecting [doc.daypilot.org]
DayPilot.Scheduler.onTimeRangeRightClick
DayPilot.Scheduler.timeRangeRightClickHandling
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot