Date Picker
A component that allows users to select a date from a calendar.
Source| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
Examples
Default Value
Use the defaultValue prop with parseDate to set the initial date value.
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
Default View
Use the defaultView prop to set which view (day, month, or year) the calendar opens to initially.
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
Range
Use the selectionMode="range" prop to allow user to pick dates range.
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
Multiple
Use the selectionMode="multiple" prop to allow selecting multiple dates. This example also shows how to display selected dates as removable tags.
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
Multiple Months
Use the numOfMonths prop to to display multiple months side by side.
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
Presets
Use the DatePickerPresetTrigger component to add quick-select preset options like "Last 7 days" or "This month".
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
Min and Max
Use the min and max props with parseDate to restrict the selectable date range. Dates outside this range will be disabled.
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
Disabled
Use the disabled prop to disable the date picker.
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |