The pattern property (string) sets the date format used when displaying the selected date in the target element.
Declaration
DayPilot.DatePicker.patternDefault Value
datePattern value of the selected locale ("M/d/yyyy").
Notes
See DayPilot.Date.toString() for supported pattern elements.
For an input target, this pattern is also used to parse typed dates as the user types. Choose a pattern users can follow, such as yyyy-MM-dd for an input displaying 2027-10-08. See the DatePicker example.
Example
const picker = new DayPilot.DatePicker({
target: "start",
pattern: "dd.MM.yyyy",
// ...
});
picker.show();See Also
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot