DateRangePicker
Click the start, then the end (either order). The value is { start, end }.
Props
labelstringLabel text.
value{ start, end }Selected range (Dates or null).
onChange({ start, end }) => voidCalled as the range is picked.
minDateEarliest selectable date.
maxDateLatest selectable date.
placeholderstringDefault:'Select range'Text when no range is chosen.
errorstringError message shown below the control; sets the invalid style.
localestringLocale for formatting.
weekStartsOn0 | 1Default:0First day of the week.
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | – | Label text. |
value | { start, end } | – | Selected range (Dates or null). |
onChange | ({ start, end }) => void | – | Called as the range is picked. |
min | Date | – | Earliest selectable date. |
max | Date | – | Latest selectable date. |
placeholder | string | 'Select range' | Text when no range is chosen. |
error | string | – | Error message shown below the control; sets the invalid style. |
locale | string | – | Locale for formatting. |
weekStartsOn | 0 | 1 | 0 | First day of the week. |
Related hooks and theme:useDismissable