Toggle Sidebar B
AppearanceLight & dark mode D

Calendar

Inline date picker built on reka-ui. One component for every selection mode — single (default), multiple, and range — plus three heading layouts, an optional ISO week-number column, and a fully custom day slot.

Default

Single date selection.

Replay preview
Event Date, August 2026

Range

Set mode to range to pick a start and end date. The model becomes a { start, end } object.

Replay preview
Event Date, August - September 2026

Multiple

Set mode to multiple to select arbitrary dates one by one. The model is an array.

Replay preview
Event Date, August 2026

Layouts

layout swaps the heading between month and year selects, one of the two, or a plain label when set to null.

Replay preview

month-and-year (default)

Event Date, August 2026

month-only

2026
Event Date, August 2026

year-only

Aug
Event Date, August 2026

null (plain heading)

August 2026
Event Date, August 2026

Number of months

Render several months side by side. They stack vertically below the md breakpoint.

Replay preview
Event Date, August - September 2026

Min and max

Bound the selectable window with minValue and maxValue. The month and year dropdowns follow the bounds: out-of-range months are disabled, the year list is trimmed, and a year switch clamps the visible month into range.

Replay preview

Disabled dates

isDateDisabled takes a matcher and blocks the dates it returns true for.

Replay preview
Event Date, August 2026

Booked dates

Pair isDateUnavailable with isDateDisabled to strike through dates that are taken rather than merely dimming them.

Replay preview

Presets

Control the visible month with v-model:placeholder so a preset can set the value and jump the calendar to it. For a preset panel inside a popover, use DatePicker's presets prop instead.

Replay preview

Custom cell size

The day slot replaces the contents of every day button — prices, dots, badges. A bare text node is the day itself; any <span> beside it is rendered small and dimmed. Give the cells room with the --cell-size variable, which also accepts breakpoint variants.

Replay preview

Basic

The minimal setup: mode defaults to single, so a v-model ref and a border are all a date picker needs.

Replay preview
Event Date, August 2026

Dropdown caption

layout="month-and-year" — the default — turns the heading into month and year selects so you can jump across the calendar without clicking through every month.

Replay preview
Event Date, August 2026

Date and time

Compose a date + time picker by pairing the calendar with a native <Input type="time"> below it in a card.

Replay preview

Custom days

The day slot receives { day, month }, so individual dates can carry their own content — an event dot, a nightly price — while the day number stays put.

Replay preview

Week numbers

showWeekNumber prefixes each row with its ISO-8601 week number in a leading column.

Replay preview
31
32
33
34
35
36
Event Date, August 2026

Hijri calendar

reka-ui takes the calendar system from the placeholder's DateValue, so a placeholder converted with toCalendar(..., new IslamicUmalquraCalendar()) renders an Umm al-Qura (Hijri) grid. Set a matching -u-ca-islamic-umalqura locale so the heading labels line up.

Replay preview

Anatomy

Import all parts and piece them together.

vue
<script setup>
import {
  Calendar,
  CalendarCell,
  CalendarCellTrigger,
  CalendarGrid,
  CalendarGridBody,
  CalendarGridHead,
  CalendarGridRow,
  CalendarHeadCell,
  CalendarHeader,
  CalendarHeading,
  CalendarNextButton,
  CalendarPrevButton,
} from "@/components/ui/calendar";
</script>

<template>
  <Calendar>
    <CalendarHeader>
      <CalendarPrevButton />
      <CalendarHeading />
      <CalendarNextButton />
    </CalendarHeader>
    <CalendarGrid>
      <CalendarGridHead>
        <CalendarGridRow>
          <CalendarHeadCell />
        </CalendarGridRow>
      </CalendarGridHead>
      <CalendarGridBody>
        <CalendarGridRow>
          <CalendarCell>
            <CalendarCellTrigger />
          </CalendarCell>
        </CalendarGridRow>
      </CalendarGridBody>
    </CalendarGrid>
  </Calendar>
</template>

API Reference

Calendar

PropTypeDefaultDescription
mode"single" | "multiple" | "range""single"Selection behaviour. Picks the underlying reka-ui primitive family.
modelValueDateValue | DateValue[] | DateRangeSelected date(s). DateValue for single, DateValue[] for multiple, { start, end } for range. Supports v-model.
layout"month-and-year" | "month-only" | "year-only" | null"month-and-year"Heading layout. null renders the plain month/year label.
placeholderDateValueThe visible month. Supports v-model:placeholder for controlled navigation.
yearRangeDateValue[]Years offered by the year select.
classstringApplied to the root. Override --cell-size / --cell-radius here (e.g. [--cell-size:--spacing(12)]) — utilities outrank the style layer that sets them per theme.
numberOfMonthsnumber1Render multiple months side by side.
showWeekNumberbooleanfalsePrefix each row with a leading column showing its ISO-8601 week number.
buttonVariantButtonVariants["variant"]"ghost"Button variant applied to the previous/next month navigation buttons.
fixedWeeksbooleanfalseAlways render six week rows.
minValueDateValueEarliest selectable date.
maxValueDateValueLatest selectable date.
isDateDisabled(date: DateValue) => booleanMatcher for dates that cannot be selected.
isDateUnavailable(date: DateValue) => booleanMatcher for dates shown as unavailable (struck through).
localestring"en"Locale for month/day names.
weekStartsOnnumber10 = Sunday, 1 = Monday.
maximumDaysnumberRange mode only. Caps the length of a range.
fixedDate"start" | "end"Range mode only. Pins one end of the range.
allowNonContiguousRangesbooleanfalseRange mode only. Lets a range span unavailable dates.
isDateHighlightable(date: DateValue) => booleanRange mode only. Matcher for dates highlighted while hovering.
EventDescription
update:modelValueFires when the selection changes. Enables v-model.
update:placeholderFires when the visible month changes. Enables v-model:placeholder.
update:startValueRange mode only. Fires when the start of the range changes.
update:validModelValueRange mode only. Fires when a complete, valid range is set.
SlotDescription
dayReplaces the contents of each day button. Receives { day, month }; style state with group-data-* variants.
calendar-headingScoped slot to override the heading. Receives { date, month, year }.
calendar-prev-iconOverride the previous-month navigation icon.
calendar-next-iconOverride the next-month navigation icon.

Accessibility

Keyboard shortcuts and ARIA behavior.

Shortcut Description
Moves to the previous day.
Moves to the next day.
Moves to the same day in the previous week.
Moves to the same day in the next week.
HomeMoves to the first day of the row.
EndMoves to the last day of the row.
Page UpMoves to the previous month.
Page DownMoves to the next month.
EnterSelects the focused date.
SpaceSelects the focused date.
  • Uses the grid pattern; the focused date is the only tabbable cell (roving tabindex).
  • Selected and disabled dates are conveyed via aria-selected and aria-disabled.