DayPilot.Calendar.onTimeRangeRightClick

The onTimeRangeRightClick event handler fires in the JavaScript Calendar component when the user right-clicks an existing time range selection, or creates a selection using the right mouse button, before the default action is performed.

Declaration

DayPilot.Calendar.onTimeRangeRightClick(args)

Parameters

  • args.start (DayPilot.Date) - selection start

  • args.end (DayPilot.Date) - selection end

  • args.resource (string | number) - resource id

  • args.preventDefault() - cancels the default action

Notes

The default action is configured by DayPilot.Calendar.timeRangeRightClickHandling.

Examples

JavaScript

const calendar = new DayPilot.Calendar("dp", {
  onTimeRangeRightClick: args => {
    args.preventDefault();
  },
  // ...
});
calendar.init();

Angular

<daypilot-calendar [config]="config"></daypilot-calendar>
config: DayPilot.CalendarConfig = {
  onTimeRangeRightClick: args => {
    args.preventDefault();
  },
  // ...
};

React

<DayPilotCalendar
  onTimeRangeRightClick={onTimeRangeRightClick}
  {/* ... */}
/>
const onTimeRangeRightClick = (args) => {
  args.preventDefault();
};

Vue

<DayPilotCalendar
  @timeRangeRightClick="onTimeRangeRightClick"
  <!-- ... -->
/>
const onTimeRangeRightClick = (args) => {
  args.preventDefault();
};

See Also

Time Range Selecting [doc.daypilot.org]

DayPilot.Calendar.onTimeRangeRightClicked

DayPilot.Calendar.timeRangeRightClickHandling

DayPilot.Calendar Class

Availability

Availability of this API item in DayPilot editions:

LitePro
DayPilot for JavaScript