Skip to content

shadcn.io is an independent project built on shadcn/ui

Components

Free

Calendar for Vue

A month grid that stays on the page for picking a day, a range or several days, for Vue on Ark UI, with blocked dates, presets and year menus.

On this page9 sections
UI library: Ark UI

A calendar lays out a month as a grid of days and keeps it on the page, so people pick a day, a range or a handful of separate days by clicking them. Reach for it when choosing the date is the task itself, as on a booking screen, a shift planner or a report filter.

When the date is one field in a form, a Date Picker opens a month in a popover instead. For a short strip of the days around today, use a Mini Calendar.

Preview width

Installation

Sign in to get your install command
Free with an account. It carries your token, so the CLI installs everything in one go.

Anatomy

Calendar anatomy: prev trigger, month select, year select, next trigger, table, table cell

Usage

import { type DateValue, parseDate } from "@ark-ui/react/date-picker";
import { useState } from "react";
import {
  Calendar, CalendarMonthSelect, CalendarNextTrigger,
  CalendarPrevTrigger, CalendarTable, CalendarTableDays,
  CalendarViewControl, CalendarWeekDays, CalendarYearSelect,
} from "@/components/ui/calendar";

The value is always an array of dates, even when one day is selected, and parseDate turns a JavaScript Date or a string such as 2026-11-11 into the DateValue it holds.

const CalendarDemo = () => {
  const [value, setValue] = useState<DateValue[]>([parseDate(new Date())]);

  const handleValueChange = (details: { value: DateValue[] }) => {
    setValue(details.value);
  };

  return (
    <Calendar
      className="w-72 rounded-xl border shadow-xs/5"
      fixedWeeks
      onValueChange={handleValueChange}
      value={value}
    >
      <CalendarViewControl>
        <CalendarPrevTrigger />
        <CalendarMonthSelect />
        <CalendarYearSelect />
        <CalendarNextTrigger />
      </CalendarViewControl>
      <CalendarTable>
        <CalendarWeekDays />
        <CalendarTableDays />
      </CalendarTable>
    </Calendar>
  );
};

Accessibility

The days sit in a grid that Ark UI describes to screen readers as a calendar month, and each day is a cell with the button role, labeled with its full date and whether it is selected, in a range or not available. Only the focused day is in the tab order, so Tab moves from the month controls into the grid and the keys below take over there. Enter or Space selects a day. Put a visible heading above the calendar that says what the date is for.

Arrow Left
Moves focus to the previous day, into the previous week or month when it has to.
Arrow Right
Moves focus to the next day, into the next week or month when it has to.
Arrow Up
Moves focus to the same day of the week in the previous week.
Arrow Down
Moves focus to the same day of the week in the next week.
Home
Moves focus to the first day of the first visible month.
End
Moves focus to the last day of the last visible month.
Page Up
Moves focus to the same day of the month in the previous month.
Page Down
Moves focus to the same day of the month in the next month.
Shift+Page Up
Moves focus to the same day in the previous year.
Shift+Page Down
Moves focus to the same day in the next year.
Enter
Selects the focused date.
Space
Selects the focused date.

Demos

Basic

One month between previous and next buttons, with nothing selected yet and no state of your own, since the calendar keeps the selection itself. Setting fixedWeeks keeps every month six rows tall, so the frame doesn't jump as the month changes. Start here when the dates people pick are a few weeks from today.

Preview width

Range

Two months side by side, with a range already selected from the 20th of this month to 18 days later. selectionMode is range, numOfMonths is 2, and the second month is a CalendarTableNextMonth next to the first. Use a range for a hotel stay, a leave request or a report period, anywhere the value is a start and an end.

Preview width

Caption

CalendarMonthSelect and CalendarYearSelect, two native selects, take the place of the month's name between the arrows. Someone can reach a date years away in two choices instead of paging month by month, and the years run from 1900 to 2099 unless min and max narrow them. Use this layout for a birth date, a contract start or a document date.

Preview width

Presets

Today, Tomorrow and Next week buttons sit under the grid. Each is a CalendarPresetTrigger with its date in value, and pressing one selects that date and moves the view to its month, so Next week near the end of a month doesn't land off screen. Add presets where most people choose a date relative to today, such as a due date or a reminder.

Preview width

Time

From and To time inputs, set to 10:30 and 12:30, sit under the grid. The calendar still holds only the date and the demo never joins the times to it, so combine the two yourself when you save a meeting. Use this layout when the month should stay open while people set the hours, and a Date Picker when the date and time are fields in a form.

Preview width

Booked dates

Days 8 through 18 of this month are booked, so they stay in the grid with a line through the number and can't be selected, while the 4th starts selected. isDateUnavailable returns true for each of them. Keep blocked days visible when people need to see why a stay won't fit, as on a booking page, and say near the calendar what the line means.

Preview width

Custom days

Each day of the month shows a price under its number, $100 on weekdays and $120 on weekends, with the 8th to the 16th selected as a range. The cells are written out by hand inside CalendarContext, from calendar.weeks, so each one can hold more than its number. Use it for fares, room rates or seats left, and keep the extra to a few characters.

Preview width

Week numbers

A column of week numbers, headed Wk, runs down the left of the grid, with the 12th of this month selected, and showWeekNumbers turns it on. Each number is the ISO week holding most of its row, so a row that starts on Sunday takes its Monday's week. One exception comes from Ark UI: the week of 29 December 2025 reads 53, where ISO counts week 1 of 2026.

Preview width

Multiple

The 4th, 12th and 18th of this month start selected, and with selectionMode set to multiple, clicking a day adds it or takes it back out. Use it for shifts, delivery days or exceptions to a schedule, dates that aren't one continuous stretch. When the value is really a start and an end, a Range fits better.

Preview width

RTL

The calendar in Arabic, inside a LocaleProvider with the ar-SA locale, and today selected. The provider gives every part its language and its direction, so the week starts at the right edge, the month and year menus follow, and the arrows flip on screen and on the keyboard, where ArrowLeft moves to the next day. dir on Calendar alone reaches only its outer element.

Preview width

FAQ

When should I use a Calendar instead of a Date Picker?

Use a Calendar when the month should stay on screen while people choose, as on a booking page, a shift planner or a report filter that sits beside its results. Every day is one click away and nothing has to open first.

Use a Date Picker when the date is one field in a form: it shows an input and opens a month in a popover only while someone is choosing. For a row of the days around today, such as a delivery slot this week, a Mini Calendar takes far less room.

How do I get the selected date out of the Calendar?

Bind a ref with v-model, which reads and writes an array of DateValue objects even when one day is selected. A DateValue is a date with no time attached. Call toString() on one for a string such as 2026-11-11 to send to a server, or toDate with a time zone when you need a JavaScript Date.

How do I select a date range or several dates with the Calendar in Vue?

Set selectionMode to range for a start and an end, or to multiple for separate days. The value stays an array either way: two sorted dates for a range, any number for multiple, which maxSelectedDates can cap. Set numOfMonths to 2 and add a second table for the next month to show two months side by side, as the Range demo does.

The Multiple demo starts with three separate days selected.

How do I disable booked or past dates in the Calendar?

Pass isDateUnavailable, a function that gets each DateValue and returns true for a day that can't be picked. Set min to close off everything before a date, today for example, and max for everything after one. Both kinds of day stay in the grid with a line through them, as in the Booked dates demo, and Enter does nothing on them.

How do I let users jump to a year, such as a birth year, in the Ark UI Calendar?

Put CalendarMonthSelect and CalendarYearSelect in the control row, as the Caption demo does, so nobody pages back month by month. The year menu runs from 1900 to 2099. For a birth date, set max to today, which also ends the menu at this year, and min to the earliest date that makes sense, whose year then opens the list.

How do I start the Calendar week on Monday?

Set startOfWeek to 1, counting from 0 for Sunday. Without it the first day comes from locale, which is en-US unless you set one, so weeks start on Sunday. The weekday headers and every row follow it, while the Week numbers column keeps counting ISO weeks either way.

Why does the Calendar select the day before the date I set?

It shouldn't: a DateValue has no time, so a date made with parseDate is the same day everywhere. Today's marker, the Today button and the day focused first follow timeZone, which this Calendar sets to the reader's own zone, so they match the reader's clock. Pass timeZone to tie them to one zone instead, and pass it to useCalendar too when the hook builds the calendar, since that path reads today in UTC.

Can the Calendar show a Persian or Hijri calendar?

Yes, once you pass createCalendar, imported from @internationalized/date, with a locale whose calendar is Persian or Islamic, such as fa-IR or ar-SA-u-ca-islamic-umalqura. Without it Ark UI keeps a Gregorian grid and only translates the names, which is what the Hijri demo shows today. Set dir to rtl as well, since the direction doesn't follow locale.

API Reference

Calendar

<div> data-slot="calendar"

PropType
open?boolean

The controlled open state of the date picker. Two-way with v-model:open.

defaultOpen?boolean

The initial open state of the date picker when rendered. Use when you don't need to control the open state of the date picker.

value?DateValue[]

The controlled selected date(s). Two-way with v-model.

defaultValue?DateValue[]

The initial selected date(s) when rendered. Use when you don't need to control the selected date(s) of the date picker.

view?"day" | "month" | "year"

The view of the calendar. Two-way with v-model:view.

Type
"day" | "month" | "year"
defaultView?"day" | "month" | "year"

The default view of the calendar.

Type
"day" | "month" | "year"
Default
"day"
closeOnSelect?boolean

Whether the calendar should close after the date selection is complete. This is ignored when the selection mode is multiple.

Default
true
createCalendar?(identifier: CalendarIdentifier) → Calendar

A function that creates a Calendar object for a given calendar identifier. Enables non-Gregorian calendar support (Persian, Buddhist, Islamic, etc.) without bundling all calendars by default. import { createCalendar } from "@internationalized/date" { locale: "fa-IR", createCalendar }

Type
(identifier: CalendarIdentifier) → Calendar
Parameters

identifier – CalendarIdentifier

Returns
Calendar
defaultFocusedValue?CalendarDate | CalendarDateTime | ZonedDateTime

The initial focused date when rendered. Use when you don't need to control the focused date of the date picker.

Type
CalendarDate | CalendarDateTime | ZonedDateTime
dir?"ltr" | "rtl"

The document's text/writing direction.

Type
"ltr" | "rtl"
Default
"ltr"
disabled?boolean

Whether the calendar is disabled.

fixedWeeks?boolean

Whether the calendar should have a fixed number of weeks. This renders the calendar with 6 weeks instead of 5 or 6.

focusedValue?CalendarDate | CalendarDateTime | ZonedDateTime

The controlled focused date.

Type
CalendarDate | CalendarDateTime | ZonedDateTime
format?(date: DateValue, details: LocaleDetails) → string

The format of the date to display in the input.

Type
(date: DateValue, details: LocaleDetails) → string
Parameters

date – DateValue

details – { locale: string; timeZone: string }

Returns
string
hideMode?"display-none" | "activity"

How to hide content when mounted but not present. - display-none: HTML hidden attribute. Effects stay alive. - activity: React 19 <Activity mode="hidden">. Effects pause. Requires React 19+.

Type
"display-none" | "activity"
Default
"display-none"
id?string

The unique identifier of the machine.

ids?object

The ids of the elements in the date picker. Useful for composition.

Type
{ root?: string; label?: (index: number) → string; table?: (id: string) → string; tableHeader?: (id: string) → string; tableBody?: (id: string) → string; tableRow?: (id: string) → string; content?: string; cellTrigger?: (id: string) → string; prevTrigger?: (view: DateView) → string; nextTrigger?: (view: DateView) → string; viewTrigger?: (view: DateView) → string; clearTrigger?: string; control?: string; input?: (index: number) → string; trigger?: string; monthSelect?: string; yearSelect?: string; positioner?: string }
immediate?boolean

Whether to synchronize the present change immediately or defer it to the next frame.

inline?boolean

Whether to render the date picker inline.

Default
true
invalid?boolean

Whether the date picker is invalid.

isDateUnavailable?(date: DateValue, locale: string) → boolean

Returns whether a date of the calendar is available.

Type
(date: DateValue, locale: string) → boolean
Parameters

date – DateValue

locale – string

Returns
boolean
lazyMount?boolean

Whether to enable lazy mounting. Ark default: false.

Default
true
locale?string

The locale (BCP 47 language tag) to use when formatting the date.

Default
"en-US"
max?CalendarDate | CalendarDateTime | ZonedDateTime

The maximum date that can be selected.

Type
CalendarDate | CalendarDateTime | ZonedDateTime
maxSelectedDates?number

The maximum number of dates that can be selected. This is only applicable when selectionMode is multiple.

maxView?"day" | "month" | "year"

The maximum view of the calendar.

Type
"day" | "month" | "year"
Default
"year"
min?CalendarDate | CalendarDateTime | ZonedDateTime

The minimum date that can be selected.

Type
CalendarDate | CalendarDateTime | ZonedDateTime
minView?"day" | "month" | "year"

The minimum view of the calendar.

Type
"day" | "month" | "year"
Default
"day"
name?string

The name attribute of the input element.

numOfMonths?number

The number of months to display.

onEnterComplete?VoidFunction

Function called when the animation ends in the open state.

onExitComplete?VoidFunction

Function called when the animation ends in the closed state.

openOnClick?boolean

Whether to open the calendar when the input is clicked.

Default
false
outsideDaySelectable?boolean

Whether day outside the visible range can be selected.

Default
false
parse?(value: string, details: LocaleDetails) → DateValue

Function to parse the date from the input back to a DateValue.

Type
(value: string, details: LocaleDetails) → DateValue
Parameters

value – string

details – { locale: string; timeZone: string }

Returns
DateValue
placeholder?string

The placeholder text to display in the input.

positioning?object

The user provided options used to position the date picker content.

Type
{ restoreStyles?: boolean; applyStyles?: boolean; hideWhenDetached?: boolean; strategy?: "absolute" | "fixed"; placement?: Placement; offset?: { mainAxis?: number; crossAxis?: number; }; gutter?: number; shift?: number; overflowPadding?: number; arrowPadding?: number; flip?: boolean | Placement[]; slide?: boolean; overlap?: boolean; sameWidth?: boolean; fitViewport?: boolean; sizeMiddleware?: boolean; boundary?: (() → Boundary) | Boundary | "clipping-ancestors"; listeners?: boolean | AutoUpdateOptions; onComplete?: (data: ComputePositionReturn) → void; onPositioned?: ((data: { placed: boolean; }) → void); getAnchorElement?: () → HTMLElement | VirtualElement | null; getAnchorRect?: (element: HTMLElement | VirtualElement | null) → AnchorRect | null; updatePosition?: ((data: { updatePosition: () → Promise<void>; floatingElement: HTMLElement | null; }) → void | Promise<void>) }
present?boolean

Whether the node is present (controlled by the user).

readOnly?boolean

Whether the calendar is read-only.

required?boolean

Whether the date picker is required.

selectionMode?"single" | "multiple" | "range"

The selection mode of the calendar. - single - only one date can be selected - multiple - multiple dates can be selected - range - a range of dates can be selected

Type
"single" | "multiple" | "range"
Default
"single"
showWeekNumbers?boolean

Whether to show the week number column in the day view.

skipAnimationOnMount?boolean

Whether to allow the initial presence animation.

Default
false
startOfWeek?number

The first day of the week. 0 - Sunday 1 - Monday 2 - Tuesday 3 - Wednesday 4 - Thursday 5 - Friday 6 - Saturday

timeZone?string

The time zone to use. Ark default: UTC.

Default
localTimeZone()
translations?object

The localized messages to use.

Type
{ dayCell?: (state: DayTableCellState) → string; nextTrigger?: (view: DateView) → string; monthSelect?: string; yearSelect?: string; viewTrigger?: (view: DateView, nextView: DateView) → string; prevTrigger?: (view: DateView) → string; presetTrigger?: (value: string[]) → string; clearTrigger?: string; trigger?: (open: boolean) → string; content?: string; placeholder?: ((locale: string) → { year: string; month: string; day: string; }); weekColumnHeader?: string; weekNumberCell?: (weekNumber: number) → string }
unmountOnExit?boolean

Whether to unmount on exit. Ark default: false.

Default
true
asChild?boolean

Use the provided child element as the default rendered element, combining their props and behavior.

class?string

Merged with the part's classes.

EventType
@open-change(details: OpenChangeDetails) → void

Function called when the calendar opens or closes.

Type
(details: OpenChangeDetails) → void
Parameters

details – { open: boolean; value: DateValue[] }

Returns
void
@value-change(details: ValueChangeDetails) → void

Function called when the value changes.

Type
(details: ValueChangeDetails) → void
Parameters

details – { value: DateValue[]; valueAsString: string[]; view: DateView }

Returns
void
@view-change(details: ViewChangeDetails) → void

Function called when the view changes.

Type
(details: ViewChangeDetails) → void
Parameters

details – { view: DateView }

Returns
void
@focus-change(details: FocusChangeDetails) → void

Function called when the focused date changes.

Type
(details: FocusChangeDetails) → void
Parameters

details – { focusedValue: DateValue; view: DateView }

Returns
void
@visible-range-change(details: VisibleRangeChangeDetails) → void

Function called when the visible range changes.

Type
(details: VisibleRangeChangeDetails) → void
Parameters

details – { view: DateView; visibleRange: { start: DateValue; end: DateValue; } }

Returns
void
AttributeType
data-disabled?string

Present when disabled.

data-empty?string

Present when the content is empty.

data-readonly?string

Present when read-only.

data-state"open" | "closed"

"open" or "closed".

Type
"open" | "closed"

CalendarClearTrigger

<button> data-slot="calendar-clear-trigger"

PropType
asChild?boolean

Use the provided child element as the default rendered element, combining their props and behavior.

CalendarControl

<div> data-slot="calendar-control"

PropType
asChild?boolean

Use the provided child element as the default rendered element, combining their props and behavior.

class?string

Merged with the part's classes.

AttributeType
data-disabled?string

Present when disabled.

data-invalid?string

Present when invalid.

data-placeholder-shown?string

Present when placeholder is shown.

CalendarLabel

<label> data-slot="calendar-label"

PropType
asChild?boolean

Use the provided child element as the default rendered element, combining their props and behavior.

class?string

Merged with the part's classes.

AttributeType
data-disabled?string

Present when disabled.

data-index?string

The index of the item.

data-invalid?string

Present when invalid.

data-readonly?string

Present when read-only.

data-state"open" | "closed"

"open" or "closed".

Type
"open" | "closed"

CalendarMonthSelect

<div> data-slot="calendar-month-select-wrapper"

PropType
asChild?boolean

Use the provided child element as the default rendered element, combining their props and behavior.

class?string

Merged with the part's classes.

CSS variableType
--cell-radiusstring

CalendarNextTrigger

<button> data-slot="calendar-next-trigger"

PropType
asChild?boolean

Use the provided child element as the default rendered element, combining their props and behavior.

class?string

Merged with the part's classes.

AttributeType
data-disabled?string

Present when disabled.

CalendarPresetTrigger

<button> data-slot="calendar-preset-trigger"

PropType
valueDateValue[] | DateRangePreset

The preset trigger's value.

Type
DateValue[] | DateRangePreset
asChild?boolean

Use the provided child element as the default rendered element, combining their props and behavior.

CalendarPrevTrigger

<button> data-slot="calendar-prev-trigger"

PropType
asChild?boolean

Use the provided child element as the default rendered element, combining their props and behavior.

class?string

Merged with the part's classes.

AttributeType
data-disabled?string

Present when disabled.

CalendarViewDate

<div> data-slot="calendar-range-text"

PropType
asChild?boolean

Use the provided child element as the default rendered element, combining their props and behavior.

class?string

Merged with the part's classes.

CalendarTable

<table> data-slot="calendar-table"

PropType
columns?number

How many cells each row holds, for months and years.

asChild?boolean

Use the provided child element as the default rendered element, combining their props and behavior.

class?string

Merged with the part's classes.

AttributeType
data-columns?string
data-view?string

The view of the table.

CalendarTableBody

<tbody> data-slot="calendar-table-body"

PropType
asChild?boolean

Use the provided child element as the default rendered element, combining their props and behavior.

AttributeType
data-disabled?string

Present when disabled.

data-view?string

The view of the tablebody.

CalendarTableCell

<td> data-slot="calendar-table-cell"

PropType
asChild?boolean

Use the provided child element as the default rendered element, combining their props and behavior.

class?string

Merged with the part's classes.

CSS variableType
--cell-radiusstring
--cell-sizestring

CalendarTableCellTrigger

<div> data-slot="calendar-table-cell-trigger"

PropType
asChild?boolean

Use the provided child element as the default rendered element, combining their props and behavior.

CSS variableType
--cell-radiusstring
--cell-sizestring

CalendarTableHead

<thead> data-slot="calendar-table-head"

PropType
asChild?boolean

Use the provided child element as the default rendered element, combining their props and behavior.

AttributeType
data-disabled?string

Present when disabled.

data-view?string

The view of the tablehead.

CalendarTableHeader

<th> data-slot="calendar-table-header"

PropType
asChild?boolean

Use the provided child element as the default rendered element, combining their props and behavior.

class?string

Merged with the part's classes.

AttributeType
data-disabled?string

Present when disabled.

data-view?string

The view of the tableheader.

CSS variableType
--cell-radiusstring
--cell-sizestring

CalendarTableRow

<tr> data-slot="calendar-table-row"

PropType
asChild?boolean

Use the provided child element as the default rendered element, combining their props and behavior.

class?string

Merged with the part's classes.

AttributeType
data-disabled?string

Present when disabled.

data-view?string

The view of the tablerow.

CalendarTrigger

<button> data-slot="calendar-trigger"

PropType
asChild?boolean

Use the provided child element as the default rendered element, combining their props and behavior.

AttributeType
data-placeholder-shown?string

Present when placeholder is shown.

data-placementstring

The placement of the trigger.

data-side"top" | "right" | "bottom" | "left"

The side of the trigger that the trigger is positioned on.

Type
"top" | "right" | "bottom" | "left"
data-state"open" | "closed"

"open" or "closed".

Type
"open" | "closed"

CalendarView

<div> data-slot="calendar-view"

PropType
asChild?boolean

Use the provided child element as the default rendered element, combining their props and behavior.

class?string

Merged with the part's classes.

AttributeType
data-view?string

The view of the view.

CalendarViewControl

<div> data-slot="calendar-view-control"

PropType
asChild?boolean

Use the provided child element as the default rendered element, combining their props and behavior.

class?string

Merged with the part's classes.

AttributeType
data-view?string

The view of the viewcontrol.

CalendarViewTrigger

<button> data-slot="calendar-view-trigger"

PropType
asChild?boolean

Use the provided child element as the default rendered element, combining their props and behavior.

class?string

Merged with the part's classes.

AttributeType
data-disabled?string

Present when disabled.

data-view?string

The view of the viewtrigger.

CSS variableType
--cell-radiusstring

CalendarYearSelect

<div> data-slot="calendar-year-select-wrapper"

PropType
asChild?boolean

Use the provided child element as the default rendered element, combining their props and behavior.

class?string

Merged with the part's classes.

CSS variableType
--cell-radiusstring
--cell-sizestring

CalendarTodayTrigger

data-slot="calendar-today-trigger"

PropType
clickEffect?boolean

Apply a click effect to the button.

Default
true
isLoading?boolean

Show a loading indicator.

Default
false
pill?boolean

Fully rounded corners.

Default
false
size?"default" | "icon" | "icon-lg" | "icon-md" | "icon-sm" | "icon-xl" | "icon-xs" | "lg" | "md" | "sm" | "xl" | "xs"

Ark default: md.

Type
"default" | "icon" | "icon-lg" | "icon-md" | "icon-sm" | "icon-xl" | "icon-xs" | "lg" | "md" | "sm" | "xl" | "xs"
Default
"lg"
variant?"default" | "destructive" | "ghost" | "link" | "outline" | "secondary"

Ark default: default.

Type
"default" | "destructive" | "ghost" | "link" | "outline" | "secondary"
Default
"outline"
asChild?boolean

Use the provided child element as the default rendered element, combining their props and behavior.

AttributeType
data-disabled?string

Present when disabled is true.

data-empty?string

Present when empty is true.

data-readonly?string

Present when readOnly is true.

data-state"open" | "closed"

"open" or "closed".

Type
"open" | "closed"

CalendarWeekDays

<thead> data-slot="calendar-table-head"

PropType
format?"narrow" | "short" | "long"

Weekday label width. short is two letters (Su), matching the other calendar bases, or the whole short name where two letters would repeat (Arabic and Hebrew short names share their first two).

Type
"narrow" | "short" | "long"
Default
"short"
asChild?boolean

Use the provided child element as the default rendered element, combining their props and behavior.

AttributeType
data-disabled?string

Present when disabled.

data-view?string

The view of the tablehead.

CalendarTableDays

PropType
asChild?boolean

Use the provided child element as the default rendered element, combining their props and behavior.

AttributeType
data-disabled?string

Present when disabled is true.

data-empty?string

Present when empty is true.

data-readonly?string

Present when readOnly is true.

data-state"open" | "closed"

"open" or "closed".

Type
"open" | "closed"

CalendarTableNextMonth

PropType
months?number

The number of months to offset.

Default
1
asChild?boolean

Use the provided child element as the default rendered element, combining their props and behavior.

AttributeType
data-disabled?string

Present when disabled is true.

data-empty?string

Present when empty is true.

data-readonly?string

Present when readOnly is true.

data-state"open" | "closed"

"open" or "closed".

Type
"open" | "closed"

CalendarWeekNumberHeaderCell

<th> data-slot="calendar-week-number-header-cell"

PropType
asChild?boolean

Use the provided child element as the default rendered element, combining their props and behavior.

class?string

Merged with the part's classes.

AttributeType
data-disabled?string

Present when disabled.

data-type?string

The type of the item.

data-view?string

The view of the weeknumberheadercell.

CSS variableType
--cell-sizestring

CalendarWeekNumberCell

<td> data-slot="calendar-week-number-cell"

PropType
weekDateValue[]

The week's days, the row it numbers.

weekIndexnumber

The week's row in the month, from 0.

asChild?boolean

Use the provided child element as the default rendered element, combining their props and behavior.

class?string

Merged with the part's classes.

AttributeType
data-disabled?string

Present when disabled.

data-type"week-number"

The type of the item.

Default
"week-number"
data-view"day"

The view of the weeknumbercell.

Default
"day"
data-week-indexstring

Mirrors weekIndex.

CSS variableType
--cell-sizestring

CalendarTableMonths

PropType
columns?number

How many months each row holds.

Default
4
format?"short" | "long"

How month names are written: short (Jan) or long (January).

Type
"short" | "long"
Default
"short"
asChild?boolean

Use the provided child element as the default rendered element, combining their props and behavior.

AttributeType
data-disabled?string

Present when disabled is true.

data-empty?string

Present when empty is true.

data-readonly?string

Present when readOnly is true.

data-state"open" | "closed"

"open" or "closed".

Type
"open" | "closed"

CalendarTableYears

PropType
columns?number

How many years each row holds.

Default
4
asChild?boolean

Use the provided child element as the default rendered element, combining their props and behavior.

AttributeType
data-disabled?string

Present when disabled is true.

data-empty?string

Present when empty is true.

data-readonly?string

Present when readOnly is true.

data-state"open" | "closed"

"open" or "closed".

Type
"open" | "closed"

CalendarRootProvider

<div> data-slot="calendar"

PropType
valueUseDatePickerReturn

What useCalendar() returns: the state and API, made outside the component to control it.

hideMode?"display-none" | "activity"

How to hide content when mounted but not present. - display-none: HTML hidden attribute. Effects stay alive. - activity: React 19 <Activity mode="hidden">. Effects pause. Requires React 19+.

Type
"display-none" | "activity"
Default
"display-none"
immediate?boolean

Whether to synchronize the present change immediately or defer it to the next frame.

lazyMount?boolean

Whether to enable lazy mounting. Ark default: false.

Default
true
onEnterComplete?VoidFunction

Function called when the animation ends in the open state.

onExitComplete?VoidFunction

Function called when the animation ends in the closed state.

present?boolean

Whether the node is present (controlled by the user).

skipAnimationOnMount?boolean

Whether to allow the initial presence animation.

Default
false
unmountOnExit?boolean

Whether to unmount on exit. Ark default: false.

Default
true
asChild?boolean

Use the provided child element as the default rendered element, combining their props and behavior.

class?string

Merged with the part's classes.

AttributeType
data-disabled?string

Present when disabled is true.

data-empty?string

Present when empty is true.

data-readonly?string

Present when readOnly is true.

data-state"open" | "closed"

"open" or "closed".

Type
"open" | "closed"

useCalendar

CalendarContext