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 Solid, Ark UI does not name the trip.
Installation
Anatomy

Usage
<Calendar class="rounded-md border" defaultFocusedValue={from} numOfMonths={2} onValueChange={handleValueChange} selectionMode="range" value={value()}>
<CalendarViewControl>
<CalendarPrevTrigger />
<CalendarViewDate />
<CalendarNextTrigger />
</CalendarViewControl>
<div class="flex flex-col gap-4 md:flex-row">
<CalendarTable>
<CalendarWeekDays />
<CalendarTableDays />
</CalendarTable>
<CalendarTable>
<CalendarWeekDays />
<CalendarTableNextMonth />
</CalendarTable>
</div>
</Calendar>FAQ
How do I read the start and end dates?
selectionMode="range" makes value the start and end dates, and onValueChange receives { value }. numOfMonths={2} shows two months, and the second CalendarTable uses CalendarTableNextMonth.
Which month is shown first?
defaultFocusedValue is the start date, so the first grid is the month the range starts in. The two tables sit in flex flex-col gap-4 md:flex-row.
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 defaultFocusedValue={from}, numOfMonths={2}, onValueChange={handleValueChange}, selectionMode="range" and value={value()}. The rest is on the Calendar page.





