DayPilot.Scheduler.onEventRightClick

The onEventRightClick event handler fires when the user right-clicks an event, before the default action configured by eventRightClickHandling.

Declaration

DayPilot.Scheduler.onEventRightClick(args)

Parameters

  • args.e (DayPilot.Event) - scheduler event object

  • args.div (HTMLElement) - DOM <div> element for the event

  • args.originalEvent (MouseEvent) - original browser right-click event

  • args.preventDefault() - cancels the default action set using eventRightClickHandling

Notes

In api=1 mode, the legacy signature is onEventRightClick(e).

Examples

JavaScript

const dp = new DayPilot.Scheduler("dp", {
  onEventRightClick: (args) => {
    if (args.e.id() === "3") {
      args.preventDefault();
    }
  },
  // ...
});
dp.init();

Angular

<daypilot-scheduler [config]="config"></daypilot-scheduler>
config: DayPilot.SchedulerConfig = {
  onEventRightClick: (args) => {
    if (args.e.id() === "3") {
      args.preventDefault();
    }
  },
  // ...
};

React

<DayPilotScheduler
  onEventRightClick={onEventRightClick}
  {/* ... */}
/>
const onEventRightClick = (args) => {
  if (args.e.id() === "3") {
    args.preventDefault();
  }
};

Vue

<DayPilotScheduler
  @eventRightClick="onEventRightClick"
  <!-- ... -->
/>
const onEventRightClick = (args) => {
  if (args.e.id() === "3") {
    args.preventDefault();
  }
};

See Also

DayPilot.Scheduler.eventRightClickHandling

DayPilot.Scheduler Class

Availability

Availability of this API item in DayPilot editions:

LitePro
DayPilot for JavaScript