The onEventClick event handler fires when the user clicks a queue item and before the default action configured using eventClickHandling.
DayPilot.Queue.onEventClick(args)args.e (DayPilot.Event) - the event reference
args.preventDefault() - cancels the default action set using eventClickHandling
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.
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();
}
};