Toggle Sidebar B
header.lightDarkMode D

Calendar

Inline date picker built on reka-ui. Three layouts: month-and-year (default), month-only, year-only. Supports single, multiple, and range selection modes.

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>

Default

Single date selection.

Event Date, June 2026

Range

Pick a start and end date.

Event Date, June 2026
June 2026

Multiple

Select arbitrary dates one by one.

Event Date, June 2026

API Reference

Props, events, and slots for each sub-component.

Calendar

Props

PropTypeDefaultDescription
modelValueDateValue | DateValue[]Selected date(s). Supports v-model.
layout"month-and-year" | "month-only" | "year-only""month-and-year"Heading layout.
mode"single" | "multiple" | "range""single"Selection mode (reka-ui).
numberOfMonthsnumber1Render multiple months side by side.
minValueDateValueEarliest selectable date.
maxValueDateValueLatest selectable date.
localestring"en"Locale for month/day names.
weekStartsOnnumber10 = Sunday, 1 = Monday.

Events

EventDescription
update:modelValueFires when the selection changes. Enables v-model.
update:placeholderFires when the focused month/year changes during navigation.

Slots

SlotDescription
calendar-headingScoped slot to override the month/year heading. Receives { headingValue }.
calendar-prev-iconOverride the previous-month navigation icon.
calendar-next-iconOverride the next-month navigation icon.

Accessibility

Keyboard shortcuts and ARIA behavior.

Keyboard

ShortcutDescription
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.