

Every state


default


focus


parsed


ambiguous-or-error


open


disabled
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| id | string | "start-date" | Id of the text input; preview, error and panel hang off it. |
| name | string | "start" | Form name of the parsed date (yyyy-mm-dd). |
| label | string | "Start date" | The field's visible label. |
| today | Date | – | Today's date; defaults to the real today. Words like "tomorrow" count from it. |
| defaultValue | string | – | Text in the field at the start; its result or error shows at once. |
| placeholder | string | "e.g. next friday" | Placeholder text. |
| examples | string[] | ["tomorrow", "next friday", "in 3 days", "12 dec"] | Examples in the hint and the error. |
| calendarLabel | string | "Pick from a calendar" | Accessible name of the calendar button. |
| locale | string | "en-GB" | Locale of the written-out date; also sets day/month order for "3/4". |
| onValueChange | (value: string) => void | – | Called with yyyy-mm-dd when an entry is read (on Enter, blur or pick). |
| required | boolean | – | Requires an entry before the form submits. |
| disabled | boolean | – | Disables the field and its calendar button. |
| error | string | – | Error message from outside; replaces the "can't read" error. |
| className | string | – | Extra classes on the field. |
More date pickers
All 10date-picker-06 is in UI ProGet UI Pro, €199


