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.
DayPilot.Scheduler.onTimeRangeDoubleClick(args)args.start (DayPilot.Date) - start of the selected range
args.end (DayPilot.Date) - end of the selected range
args.resource (string | number) - selected resource id
args.preventDefault() - cancels the default action
In api=1 mode, the legacy signature is onTimeRangeDoubleClick(start, end, resource).
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);
};Time Range Double Click [doc.daypilot.org]
DayPilot.Scheduler.onTimeRangeDoubleClicked