Skip to content

onEventOpen

Hears “Open” chosen in the context menu of an event.

Type(instance: EventInstance) => void
Defaultnot set
Live update (update())Yes
Declared inpackages/dom/src/settings.ts

With it, an event’s context menu offers “Open”; chosen, you receive the event’s instance — show your details or your editor. Without onEventClick, Enter or Space on a focused event calls this one too, and so do a click on an event in the list views and a view of your own calling its open (in the grids and the timeline a click stays onEventClick’s). The Pro’s editor (@dzcalendar/pro/editor) is one way to answer it.

import { createCalendar } from '@dzcalendar/dom';
createCalendar(element, {
timeZone: 'Europe/Paris',
onEventOpen: (instance) => location.assign(`/appointments/${instance.event.id}`),
});

In the frameworks it is an output: Angular’s (eventOpen), React’s onEventOpen, Vue’s @event-open.