The onTimeRangeDoubleClick event handler fires when the user double-clicks an existing time range selection in the JavaScript Scheduler component, before the default action configured by timeRangeDoubleClickHandling is performed.
Declaration
DayPilot.Scheduler.onTimeRangeDoubleClick(args)Parameters
args.start(DayPilot.Date) - start of the selected rangeargs.end(DayPilot.Date) - end of the selected rangeargs.resource(string | number) - selected resource idargs.preventDefault()- cancels the default action
Notes
In api=1 mode, the legacy signature is onTimeRangeDoubleClick(start, end, resource).
Examples
JavaScript
const dp = new DayPilot.Scheduler("dp", {
timeRangeDoubleClickHandling: "Enabled",
onTimeRangeDoubleClick: (args) => {
args.preventDefault();
console.log(args.start.toString(), args.end.toString(), args.resource);
},
// ...
});
dp.init();Angular
<daypilot-scheduler [config]="config"></daypilot-scheduler>config: DayPilot.SchedulerConfig = {
timeRangeDoubleClickHandling: "Enabled",
onTimeRangeDoubleClick: (args) => {
args.preventDefault();
console.log(args.start.toString(), args.end.toString(), args.resource);
},
// ...
};React
<DayPilotScheduler
timeRangeDoubleClickHandling="Enabled"
onTimeRangeDoubleClick={onTimeRangeDoubleClick}
{/* ... */}
/>const onTimeRangeDoubleClick = (args) => {
args.preventDefault();
console.log(args.start.toString(), args.end.toString(), args.resource);
};Vue
<DayPilotScheduler
timeRangeDoubleClickHandling="Enabled"
@timeRangeDoubleClick="onTimeRangeDoubleClick"
<!-- ... -->
/>const onTimeRangeDoubleClick = (args) => {
args.preventDefault();
console.log(args.start.toString(), args.end.toString(), args.resource);
};See Also
Time Range Double Click [doc.daypilot.org]
DayPilot.Scheduler.onTimeRangeDoubleClicked
DayPilot.Scheduler.timeRangeDoubleClickHandling
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot