The timeRangeRightClickHandling property (string) specifies the default action for right-clicking an existing time range, or creating a selection using the right mouse button, in the JavaScript Calendar component.
DayPilot.Calendar.timeRangeRightClickHandling"ContextMenu" - opens the time range selection context menu configured using DayPilot.Calendar.contextMenuSelection.
"Disabled" - disables the built-in time range right-click handling.
"Enabled" - keeps the standard time range right-click behavior and fires the related right-click events.
"CallBack" - executes the server-side right-click action using CallBack (ASP.NET WebForms, ASP.NET MVC, and Java versions only).
"PostBack" - executes the server-side right-click action using PostBack (ASP.NET WebForms only).
"ContextMenu"Use DayPilot.Calendar.onTimeRangeRightClick to intercept the action before the default behavior is performed, and DayPilot.Calendar.onTimeRangeRightClicked to react after it finishes.
JavaScript
const calendar = new DayPilot.Calendar("dp", {
timeRangeRightClickHandling: "ContextMenu",
// ...
});
calendar.init();Angular
<daypilot-calendar [config]="config"></daypilot-calendar>config: DayPilot.CalendarConfig = {
timeRangeRightClickHandling: "ContextMenu",
// ...
};React
<DayPilotCalendar
timeRangeRightClickHandling="ContextMenu"
{/* ... */}
/>Vue
<DayPilotCalendar
:timeRangeRightClickHandling="'ContextMenu'"
<!-- ... -->
/>DayPilot.Calendar.contextMenuSelection
DayPilot.Calendar.onTimeRangeRightClick
DayPilot.Calendar.onTimeRangeRightClicked
Time Range Context Menu [doc.daypilot.org]