- Accordion
- Action Bar
- Alert Dialog
- Alert
- Announcement
- Aspect Ratio
- Autocomplete
- Avatar
- Badge
- Bottom Navigation
- Breadcrumb
- Button Group
- Button
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Circular Progress
- Circular Slider
- Clipboard
- Collapsible
- Color Picker
- Combobox
- Command
- Context Menu
- Data List
- Date Picker
- Dialog
- Drawer
- Editable
- Field
- File Upload
- Float
- Floating Panel
- Frame
- Hint
- Hover Card
- Image Cropper
- Input Group
- Input OTP
- Input
- Item
- Kbd
- Link Overlay
- Listbox
- Marquee
- Menu
- Native Select
- Number Input
- Pagination
- Popover
- Progress
- Prose
- QR Code
- Radio Group
- Rating
- Resizable
- Scroll Area
- Segment Group
- Select
- Separator
- Sheet
- Sidebar
- Signature Pad
- Skeleton
- Skip Nav
- Slider
- Spinner
- Status
- Steps
- Switch
- Table
- Tabs
- Textarea
- Timer
- Toast
- Toggle Group
- Toggle Tooltip
- Toggle
- Tooltip
- Tour
- Tree View
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
29 | 30 | 31 | 1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 1 | 2 |
Installation
pnpm dlx shadcn@latest add https://shark.vini.one/r/calendar.json
Usage
import { Calendar, CalendarNextTrigger, CalendarPrevTrigger, CalendarTable, CalendarTableDays, CalendarViewControl, CalendarViewDate, CalendarWeekDays, } from "@/components/ui/calendar";
<Calendar> <CalendarViewControl> <CalendarPrevTrigger /> <CalendarViewDate /> <CalendarNextTrigger /> </CalendarViewControl> <CalendarTable> <CalendarWeekDays /> <CalendarTableDays /> </CalendarTable> </Calendar>
Controlled
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
29 | 30 | 31 | 1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 1 | 2 |
2026-04-03
Examples
Date Range
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
29 | 30 | 31 | 1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 1 | 2 |
Month and Year Selector
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
29 | 30 | 31 | 1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 1 | 2 |
With Presets
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
29 | 30 | 31 | 1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 1 | 2 |
Multiple Months
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
29 | 30 | 31 | 1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 1 | 2 |
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
26 | 27 | 28 | 29 | 30 | 1 | 2 |
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 | 1 | 2 | 3 | 4 | 5 | 6 |
Min and Max
Use the min and max props with parseDate to restrict the selectable date range.
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
23 | 24 | 25 | 26 | 27 | 28 | 1 |
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 | 1 | 2 | 3 | 4 | 5 |
Select Today
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
29 | 30 | 31 | 1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 1 | 2 |
Fixed Weeks
Use the fixedWeeks prop to always display 6 weeks in the calendar, preventing layout shifts when navigating between months.
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
29 | 30 | 31 | 1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 1 | 2 |
3 | 4 | 5 | 6 | 7 | 8 | 9 |
Booked Dates
Use the isDateUnavailable prop to mark specific dates as unavailable.
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
29 | 30 | 31 | 1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 1 | 2 |
Custom Cell Size
Use [--cell-size:--spacing("value")] to set the size of the calendar cells.
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
29 | 30 | 31 | 1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 1 | 2 |
Breakpoint utilities change the cell size at different screen sizes.
md:[--cell-size:--spacing(10)] lg:[--cell-size:--spacing(12)]
API Reference
Calendar
Root component. Manages date view, selection, and navigation.
| Prop | Type | Default |
|---|---|---|
value | DateValue[] | - |
defaultValue | DateValue[] | - |
onValueChange | (details: ValueChangeDetails) => void | - |
selectionMode | "single" | "range" | "multiple" | "single" |
min | DateValue | - |
max | DateValue | - |
isDateUnavailable | (date: DateValue) => boolean | - |
fixedWeeks | boolean | false |
outsideDaySelectable | boolean | false |
numOfMonths | number | 1 |
className | string | - |
asChild | boolean | false |
| Attribute | Default |
|---|---|
--cell-size | --spacing(8) |
CalendarViewControl
Holds prev/next buttons and month/year selects.
| Prop | Type | Default |
|---|---|---|
className | string | - |
asChild | boolean | false |
CalendarMonthSelect
Month selector dropdown. Uses NativeSelect internally.
| Prop | Type | Default |
|---|---|---|
format | "short" | "long" | "short" |
className | string | - |
asChild | boolean | false |
CalendarYearSelect
Year selector dropdown.
| Prop | Type | Default |
|---|---|---|
className | string | - |
asChild | boolean | false |
CalendarTable
Table layout for the calendar day grid.
| Prop | Type | Default |
|---|---|---|
className | string | - |
asChild | boolean | false |
CalendarWeekDays
Header row with week day names (Sun–Sat).
| Prop | Type | Default |
|---|---|---|
format | "narrow" | "short" | "long" | "narrow" |
className | string | - |
asChild | boolean | false |
CalendarTableDays
Body with day cells for the current month.
| Prop | Type | Default |
|---|---|---|
className | string | - |
asChild | boolean | false |
CalendarTableNextMonth
Body for additional month(s). Use with numOfMonths for multi-month layout.
| Prop | Type | Default |
|---|---|---|
months | number | 1 |
className | string | - |
asChild | boolean | false |
CalendarTableCell
Single day cell. Clickable for selection. Shows disabled/outside styling.
| Prop | Type | Default |
|---|---|---|
value | DateValue | - |
className | string | - |
asChild | boolean | false |
parseDate
Utility for parsing dates. Use with min, max, value, and defaultValue.
import { parseDate } from "@/components/ui/calendar"; // Parse from Date, string, or timestamp parseDate(new Date()); parseDate("2024-01-15"); parseDate(Date.now());
For a complete list of props, see the Ark UI documentation.
On This Page