

Every state


default


focus


open


range-selected


filled


error


disabled
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| id | string | "report-dates" | Id of the trigger; the panel and error ids hang off it. |
| label | string | "Report period" | The field's visible label. |
| description | string | – | Help line under the field. |
| fromName | string | "from" | Form name of the hidden first day (ISO yyyy-mm-dd). |
| toName | string | "to" | Form name of the hidden last day (ISO yyyy-mm-dd). |
| defaultValue | { from: string; to: string } | – | The range at the start, as ISO dates. |
| defaultOpen | boolean | – | Opens the panel at the start. |
| presets | DatePickerRangePreset[] | – | Presets: id, label and a range(today) function. Defaults to Today, Last 7 days, Last 30 days, This month, Last month and This year. |
| max | string | – | The last day that can be picked, ISO yyyy-mm-dd. |
| today | Date | – | Today's date; defaults to the real today. |
| locale | string | "en-GB" | Locale for every date shown. |
| placeholder | string | "Choose dates" | Text in the field before a range is set. |
| onValueChange | (value: { from: string; to: string }) => void | – | Called with the ISO range on Apply. |
| required | boolean | – | Marks the field as required. |
| disabled | boolean | – | Disables the field. |
| error | string | – | Error message; marks the field invalid. |
| className | string | – | Extra classes on the wrapper. |
More date pickers
All 10date-picker-08 is in UI ProGet UI Pro, €199


