DayPilot.Modal.locale

The locale property (string) specifies the locale ID used by date and date/time fields displayed by DayPilot.Modal.form().

If the value is not specified, the modal form uses the "en-us" locale.

Declaration

DayPilot.Modal.locale

Default Value

null

Notes

This property provides the default locale for date and datetime fields in the form.

Individual form fields can override the form-wide DayPilot.Modal.locale setting using their own locale value.

Example

const showDialog = async () => {

  const form = [
    { name: "Start", id: "start", type: "date" },
    { name: "End", id: "end", type: "datetime" },
    // ...
  ];

  const data = {};

  const options = {
    locale: "de-de"
  };

  const modal = await DayPilot.Modal.form(form, data, options);

  // ...
}

See Also

DayPilot.Modal.form()

DayPilot.Modal.autofocus

DayPilot.Modal.focus

DayPilot.Modal Class

Availability

Availability of this API item in DayPilot editions:

LitePro
DayPilot for JavaScript