shadcn.io is not affiliated with official shadcn/ui
Date Picker examples · Standard
Date Picker with Month and Year Selector for React
A date picker with month and year dropdowns in place of the previous and next arrows.
A Date Picker whose header is two dropdowns, month and year, instead of arrows. Jump straight to March 1998 or December 2030 without paging month by month. Use it for birthdays, expiry dates and any date far from today.
Preview
Installation
FAQ
Which parts make the header?
The month select and the year select, side by side in the view control with gap-2; the month one grows to fill the row. They're native select elements that ship with the date picker.
Do the dropdowns follow the calendar?
Yes. They read and set the month on view, so they always match the month shown. Changing one doesn't change the selected date.
Which years are in the list?
The date picker's default range around today. Set min and max on DatePicker to bound it, such as 1900 to this year for a birth date.
Can I keep the previous and next arrows?
Yes. Put the previous trigger before the selects and the next trigger after them, as the date picker's own default header does.
Related
- Date Picker with RangeA date range picker that shows two months
- Date Picker with Natural LanguageA date picker with quick-select shortcuts
- Date Picker with Disabled DatesA date picker that disables weekends, a
- Date Picker as Appointment PickerA date picker that opens a calendar
- Date Picker with Date and TimeA date picker with a time field under the
- Date Picker with Custom Select Day StyleA date picker with round days that