v0.29.2
Use to select a single date from the calendar.
Edit the code below to see your changes live!
Supports all native <input [type="date"] />
element attributes.
Prop Name | Type | Default | Description |
---|---|---|---|
onDateChange * | (date: string) => void |
| Callback called with value of selected date. |
label | string |
| Adds a label to the field. |
value | string |
| The ISO time that should be used as the input value. |
max | string |
| Maximum date in ISO format that can selected in the calendar. |
min | string |
| Minimum date in ISO format that can selected in the calendar. |
dateFormat | string | EE, dd MMM, yyyy | Format for selected date to be displayed in input. |
locale | string | en-US | Locale used to format the the date and calendar. See DateTimeFormat |
Props ending with * are required
Datepicker allows you to pass in an error
message that will control the styles of a counter. The logic on the datepicker can be controlled with the onDateChange
prop.
Edit the code below to see your changes live!