DayPilot.Calendar.eventClickHandling

The eventClickHandling property (string) specifies the default action for clicking an event in the JavaScript Calendar component.

Declaration

DayPilot.Calendar.eventClickHandling

Possible Values

  • "Enabled" - keeps the standard event click behavior and runs the configured click handlers.

  • "Disabled" - disables built-in event click handling.

  • "PostBack" - executes the server-side event click action using PostBack (ASP.NET WebForms only).

  • "CallBack" - executes the server-side event click action using CallBack (ASP.NET WebForms, ASP.NET MVC, and Java versions only).

  • "JavaScript" - uses the client-side JavaScript API and fires the client-side click handlers instead of a server callback.

  • "Edit" - starts the default event editing action (DayPilot Pro only).

  • "Select" - selects the clicked event (DayPilot Pro only).

  • "ContextMenu" - shows the event context menu configured using DayPilot.Calendar.contextMenu.

  • "Bubble" - shows the event bubble configured using DayPilot.Calendar.bubble (DayPilot Pro only).

Default Value

"Enabled"

Notes

Use DayPilot.Calendar.onEventClick(args) to intercept the click before the default action is performed, and use DayPilot.Calendar.onEventClicked(args) when you need to react after the default action has finished.

If eventClickHandling is set to "Bubble" and you want click to be the only activation mode, disable hover activation using DayPilot.Calendar.eventHoverHandling.

Examples

JavaScript

const calendar = new DayPilot.Calendar("dp", {
  eventClickHandling: "Edit",
  // ...
});
calendar.init();

Angular

<daypilot-calendar [config]="config"></daypilot-calendar>
config: DayPilot.CalendarConfig = {
  eventClickHandling: "Edit",
  // ...
};

React

<DayPilotCalendar
  eventClickHandling="Edit"
  {/* ... */}
/>

Vue

<DayPilotCalendar
  eventClickHandling="Edit"
  <!-- ... -->
/>

See Also

Event Click [doc.daypilot.org]

Event Bubble [doc.daypilot.org]

Event Selecting [doc.daypilot.org]

Event Context Menu [doc.daypilot.org]

DayPilot.Calendar.contextMenu

DayPilot.Calendar.bubble

DayPilot.Calendar.eventHoverHandling

DayPilot.Calendar.onEventClick

DayPilot.Calendar.onEventClicked

DayPilot.Calendar Class

Availability

Availability of this API item in DayPilot editions:

LitePro
DayPilot for JavaScript

Lite does not support: Bubble, Edit, Select