The onEventSelect event handler fires before an event is selected as a result of an event click when eventClickHandling is set to "Select".
Declaration
DayPilot.Queue.onEventSelect(args)Parameters
args.e(DayPilot.Event) - the event that is about to be selectedargs.preventDefault()- cancels the default selection
Notes
This handler runs before the click-triggered selection is applied, so you can use args.preventDefault() to keep the event unselected.
Examples
JavaScript
const queue = new DayPilot.Queue("dp", {
eventClickHandling: "Select",
onEventSelect: (args) => {
console.log("About to select:", args.e);
},
// ...
});
queue.init();Angular
<daypilot-queue [config]="config"></daypilot-queue>config: DayPilot.QueueConfig = {
eventClickHandling: "Select",
onEventSelect: (args) => {
console.log("About to select:", args.e);
},
// ...
};React
<DayPilotQueue
eventClickHandling="Select"
onEventSelect={onEventSelect}
{/* ... */}
/>const onEventSelect = (args) => {
console.log("About to select:", args.e);
};Vue
<DayPilotQueue
eventClickHandling="Select"
@eventSelect="onEventSelect"
<!-- ... -->
/>const onEventSelect = (args) => {
console.log("About to select:", args.e);
};See Also
DayPilot.Queue.eventClickHandling
DayPilot.Queue.onEventSelected
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot