The onEventSelected event handler fires after an event has been selected as a result of an event click when eventClickHandling is set to "Select".
Declaration
DayPilot.Queue.onEventSelected(args)Parameters
args.e(DayPilot.Event) - the selected event
Notes
This handler runs after the default selection has been applied. If you need to cancel the selection before it happens, use DayPilot.Queue.onEventSelect instead.
Examples
JavaScript
const queue = new DayPilot.Queue("dp", {
eventClickHandling: "Select",
onEventSelected: (args) => {
console.log("Selected event:", args.e);
},
// ...
});
queue.init();Angular
<daypilot-queue [config]="config"></daypilot-queue>config: DayPilot.QueueConfig = {
eventClickHandling: "Select",
onEventSelected: (args) => {
console.log("Selected event:", args.e);
},
// ...
};React
<DayPilotQueue
eventClickHandling="Select"
onEventSelected={onEventSelected}
{/* ... */}
/>const onEventSelected = (args) => {
console.log("Selected event:", args.e);
};Vue
<DayPilotQueue
eventClickHandling="Select"
@eventSelected="onEventSelected"
<!-- ... -->
/>const onEventSelected = (args) => {
console.log("Selected event:", args.e);
};See Also
DayPilot.Queue.eventClickHandling
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot