DayPilot.Queue.onEventClick

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

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

DayPilot.Queue Class

Availability

Availability of this API item in DayPilot editions:

LitePro
DayPilot for JavaScript