shadcn.io is an independent project built on shadcn/ui
Two months sit side by side. The range starts on the 8th through the 22nd of this month, and the second grid is the next month. The days between those dates are selected.
Use it for a booking, a report, or a filter that covers a period. Separate days that are not a stretch need multiple selection. A field that opens the two months is a Date Picker. In React, Base UI does not name the trip.
Installation
Anatomy

Usage
<Calendar
className="rounded-md border"
defaultMonth={date?.from}
mode="range"
numberOfMonths={2}
onSelect={setDate}
selected={date}
/>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.
API Reference
Calendar
Sets defaultMonth={date?.from}, mode="range", numberOfMonths={2}, onSelect={setDate} and selected={date}. The rest is on the Calendar page.





