Datepicker

Datepicker is good

Edit the code below to see your changes live!

API

Supports all native <input [type="date"] /> element attributes.

Datepicker

Prop Name
Type
Default
Description
onDateChange *(date: string) => void

Callback called with value of selected date.

labelstring

Adds a label to the field.

valuestring

The ISO time that should be used as the input value.

maxstring

Maximum date in ISO format that can selected in the calendar.

minstring

Minimum date in ISO format that can selected in the calendar.

dateFormatstringEE, dd MMM, yyyy

Format for selected date to be displayed in input.

localestringen-US

Locale used to format the the date and calendar. See DateTimeFormat

Props ending with * are required

Error State

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.

Please select a date.

Edit the code below to see your changes live!

Beta