The DayPilot.Modal class displays modal dialogs that can host custom HTML content and user input workflows.
It is commonly used with DayPilot calendar, month, and scheduler components for event creation, event editing, and replacing the browser alert, prompt, and confirm dialogs.
Accessible Dialogs and Keyboard Focus
In DayPilot Lite since version 2026.4.895 and DayPilot Pro for JavaScript since version 2026.4.7147, the active dialog exposes dialog semantics and an accessible name. Use ariaLabel to supply a concise name, for example "Edit reservation". Otherwise, the dialog derives its name from its title or content, with "Dialog" as a fallback.
Keyboard focus stays within the active dialog, and background content is inert while it is open. When a nested dialog closes, the previous dialog becomes active again. Closing a dialog restores focus to its opener when that element remains available, while respecting focus explicitly moved by the application or a newer dialog.
For forms, autoFocus and focus control initial field focus. Text-field labels are associated with their inputs. See form() for field definitions and options. Standalone @daypilot/modal releases have separate version requirements.
Members
Download
The DayPilot.Modal Dialog script is open-source (Apache License 2.0).
DayPilot