The autoFocus property (boolean) enables or disables automatic focus for forms displayed using DayPilot.Modal.form().
DayPilot.Modal.autoFocustrueBy default, the modal dialog focuses the first form field when it opens. You can use the focus property to target a specific field instead.
const form = [
{name: "Start", id: "start", type: "datetime"},
{name: "End", id: "end", type: "datetime"},
{name: "Text", id: "text"},
];
const data = {
text: "Event 1",
start: "2025-11-01T10:00:00",
end: "2025-11-02T12:00:00",
};
const modal = await DayPilot.Modal.form(form, data, {
autoFocus: false
});