shadcn.io is not affiliated with official shadcn/ui
Calendar examples · Standard
Calendar with Range for React
A two-month calendar for selecting a start and an end date.
A Calendar in range mode with this month and the next side by side. Click a start and an end, and the days between are shaded. It starts on the 8th through the 22nd of the current month. Use it for bookings, reports and filters that cover a period.
Preview
Installation
FAQ
How do I read the start and end dates?
mode="range" makes selected an object with from and to, and onSelect updates it. numberOfMonths={2} shows two months. This demo starts at the 8th through the 22nd of the current month.
Which month is shown first?
defaultMonth is selected.from, so the first grid is the month the range starts in.
What range is selected at first?
The 8th through the 22nd of the current month. Both dates are in that month, and the second grid shows the following month.
Related
- Calendar with Month and Year SelectorA calendar with month and year dropdowns
- Calendar as Appointment PickerA calendar beside a scrolling list of
- Date Picker with RangeA date range picker that shows two months
- Calendar with Range in DialogA button that opens a dialog with a
- Date Picker with Month and Year SelectorA date picker with month and year
- Calendar with Natural LanguageA calendar with quick-select shortcuts