DayPilot.Scheduler.contextMenu

The contextMenu property specifies a context menu for JavaScript Scheduler events. To enable and define a context menu use a DayPilot.Menu class.

Declaration

DayPilot.Scheduler.contextMenu (DayPilot.Menu class)

Default Value

null

Example

contextMenu: new DayPilot.Menu({
  items: [
    {text: "Show event ID", onClick: args => {alert("Event ID: " + args.source.data.id);} },
    {text: "Show event text", onClick: args => {alert("Event text: " + args.source.text());} },
    {text: "Show event start", onClick: args => {alert("Event start: " + args.source.start());} },
    {text: "Delete this event", onClick: args => { dp.events.remove(args.source}; } 
  ]
})

Related Properties