

Every state


default


focus


slot-chosen


full


loading


error


disabled
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| id | string | "slot" | Id prefix for the slots and the status line. |
| name | string | "appointment" | Form name of the hidden local date-time, yyyy-mm-ddThh:mm. |
| getSlots | (date: Date) => DatePickerTimeSlot[] | Promise<DatePickerTimeSlot[]> | – | The slots (time, available) for a day; may return a promise. The default makes up a small practice's diary. |
| defaultDate | string | – | The day shown at the start, ISO yyyy-mm-dd; defaults to today. |
| defaultTime | string | – | The time chosen at the start, e.g. "10:30". |
| closedDays | number[] | [0, 6] | Weekdays that are closed, 0 = Sunday. |
| loading | boolean | – | Shows the slots as loading. |
| today | Date | – | Today's date; defaults to the real today. Days before it are closed. |
| locale | string | "en-GB" | Locale for dates. |
| onValueChange | (value: { date: string; time: string }) => void | – | Called with the ISO date and time when a slot is chosen. |
| required | boolean | – | Requires a time before the form submits. |
| disabled | boolean | – | Disables the calendar and the slots. |
| error | string | – | Error message; marks the slots invalid. |
| className | string | – | Extra classes on the wrapper. |
More date pickers
All 10date-picker-09 is in UI ProGet UI Pro, €199


