The onEventClick event handler fires when the user clicks a queue item and before the default action configured using eventClickHandling.
Declaration
DayPilot.Queue.onEventClick(args)Parameters
args.e(DayPilot.Event) - the event referenceargs.preventDefault()- cancels the default action set using eventClickHandling
Notes
Call args.preventDefault() when you want to suppress the built-in click behavior and handle the click yourself. The default behavior is controlled by eventClickHandling.
Examples
JavaScript
const dp = new DayPilot.Queue("dp", {
onEventClick: (args) => {
if (args.e.id() === "3") {
args.preventDefault();
}
},
// ...
});
dp.init();Angular
<daypilot-queue [config]="config"></daypilot-queue>config: DayPilot.QueueConfig = {
onEventClick: (args) => {
if (args.e.id() === "3") {
args.preventDefault();
}
},
// ...
};React
<DayPilotQueue
onEventClick={onEventClick}
{/* ... */}
/>const onEventClick = (args) => {
if (args.e.id() === "3") {
args.preventDefault();
}
};Vue
<DayPilotQueue
@eventClick="onEventClick"
<!-- ... -->
/>const onEventClick = (args) => {
if (args.e.id() === "3") {
args.preventDefault();
}
};See Also
DayPilot.Queue.eventClickHandling
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot