DayPilot.Calendar.contextMenu

The contextMenu property (DayPilot.Menu) sets the calendar event context menu object.

Declaration

DayPilot.Calendar.contextMenu

Default Value

null

Examples

JavaScript

const calendar = new DayPilot.Calendar("dp", {
  contextMenu: new DayPilot.Menu({
    items: [
      {
        text: "Delete",
        onClick: args => calendar.events.remove(args.source)
      }
    ]
  }),
  // ...
});
calendar.init();

Angular

<daypilot-calendar [config]="config"></daypilot-calendar>
config: DayPilot.CalendarConfig = {
  contextMenu: new DayPilot.Menu({
    items: [
      {
        text: "Delete",
        onClick: args => calendar.events.remove(args.source)
      }
    ]
  }),
  // ...
};

React

<DayPilotCalendar
  contextMenu={new DayPilot.Menu({
    items: [
      {
        text: "Delete",
        onClick: args => calendar.events.remove(args.source)
      }
    ]
  })}
  {/* ... */}
/>

Vue

<DayPilotCalendar
  :contextMenu="new DayPilot.Menu({
    items: [
      {
        text: "Delete",
        onClick: args => calendar.events.remove(args.source)
      }
    ]
  })"
  <!-- ... -->
/>

See Also

Availability

Availability of this API item in DayPilot editions:

LitePro
DayPilot for JavaScript