The onEventSelected event handler fires after an event has been selected as a result of an event click when eventClickHandling is set to "Select".
DayPilot.Queue.onEventSelected(args)args.e (DayPilot.Event) - the selected event
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.
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);
};