Components

Month Picker

Accessible month grid with locale labels, paging, constraints, and single or multiple selection.

MonthPicker displays one year at a time as a month grid. It supports roving focus, year paging, locale labels, constraints, and single or multiple selection.

Use Month Picker for values that do not need a day. Slots and ui style its generated parts.

Values use @internationalized/date. Install it beside Akaza UI when application code creates dates: pnpm add akaza-ui @internationalized/date.

Anatomy

  • #previous: Previous-year control content with disabled state.
  • #heading: Current year label and visible month items.
  • #next: Next-year control content with disabled state.
  • #month: Month button content with date, label, selected, today, focused, disabled, and unavailable state.
  • #footer: Optional content after the grid with current value and placeholder.

Month Picker generates the root, header, navigation buttons, live heading, ARIA grid, rows, cells, and month buttons.

Usage

2026

Selected: 2026-08-01

Examples

Multiple months

Set multiple to use an array model. Activating an already selected month removes it unless preventDeselect is enabled.

<MonthPicker v-model="months" multiple />

Constraints and unavailable months

Use minValue and maxValue for hard boundaries. Use isMonthDisabled for application rules and isMonthUnavailable for valid but unselectable periods.

<MonthPicker
  v-model="month"
  :min-value="new CalendarDate(2026, 3, 1)"
  :max-value="new CalendarDate(2026, 10, 1)"
  :is-month-unavailable="date => date.month === 7"
/>

Blocked months remain keyboard discoverable through aria-disabled, but activation does not update the model.

Controlled paging

Bind v-model:placeholder when application state must own the displayed year. nextPage and prevPage can replace default one-year arithmetic.

<MonthPicker
  v-model="month"
  v-model:placeholder="visibleYear"
  :next-page="date => date.add({ years: 2 })"
  :prev-page="date => date.subtract({ years: 2 })"
/>

Custom month content

The month slot changes visible button content without replacing keyboard or ARIA behavior.

<MonthPicker>
  <template #month="{ label, selected, today }">
    <span :class="{ 'font-bold': selected, underline: today }">{{ label }}</span>
  </template>
</MonthPicker>

Cancel changes

Selection and page updates emit cancelable details before mutating their models.

<MonthPicker
  v-model="month"
  @value-change="(_value, details) => locked && details.cancel()"
/>

Calendar-aware pages

Previous/next move by calendar year, not a fixed twelve months. This includes calendars with leap months, such as Hebrew. Visible month/year labels use the value's calendar and the requested locale.

API Reference

Models

ModelTypeDefaultDescription
v-modelCalendarDateValue | CalendarDateValue[] | undefinedundefinedSelected month or selected months when multiple is enabled. Values are normalized to day 1.
v-model:placeholderCalendarDateValueselected month or todayYear displayed by the grid.

Props

PropTypeDefaultDescription
localestring"en-US"Locale used for month and year labels.
dir"ltr" | "rtl""ltr"Reading direction and horizontal arrow behavior.
calendarLabelstring"Month picker"Accessible root label.
columnsnumber3Number of month columns.
multiplebooleanfalseEnables independent multiple selection.
preventDeselectbooleanfalsePrevents removing an already selected month.
disabledbooleanfalseDisables paging and selection.
readOnlybooleanfalseAllows navigation but blocks selection.
initialFocusbooleanfalseFocuses the selected month, current month, or first visible month on mount.
minValueCalendarDateValueEarliest selectable month and page boundary.
maxValueCalendarDateValueLatest selectable month and page boundary.
isMonthDisabled(date) => booleanMarks a month disabled by application rules.
isMonthUnavailable(date) => booleanMarks a month unavailable.
nextPage(placeholder) => CalendarDateValueadd one yearCustom next-page calculation.
prevPage(placeholder) => CalendarDateValuesubtract one yearCustom previous-page calculation.
uiMonthPickerUiClasses for generated parts.

Emits

EventPayloadDescription
update:modelValuevalueFires after accepted selection changes.
update:placeholderdateFires after accepted page changes.
value-change(value, details)Fires before selection. details.cancel() prevents update.
placeholder-change(date, details)Fires before paging. details.cancel() prevents update.

Slots

SlotPropsDescription
previousdisabledPrevious control content.
headinglabel, itemsCurrent year heading.
nextdisabledNext control content.
monthdate, label, selected, today, disabled, unavailable, focusedMonth button content and state.
footervalue, placeholderOptional content after grid.

Methods

MethodDescription
focusValue(date)Moves roving focus to a month and pages when needed.
selectValue(date, event?)Requests month selection.
nextPage(event?)Requests next page.
previousPage(event?)Requests previous page.

UI Options

KeyPart
rootRoot group.
headerNavigation header.
previousPrevious-year button.
headingLive year heading.
nextNext-year button.
gridARIA month grid.
gridRowGrid row.
cellGrid cell.
cellTriggerInteractive month button.
footerOptional footer.

Styling Hooks

UI keyCSS classData attributes
root.akaza-month-pickerdata-akaza-state, data-akaza-selection-mode, data-akaza-disabled, data-akaza-readonly, data-akaza-invalid
header.akaza-month-picker-header
previous.akaza-month-picker-previousdata-akaza-disabled
heading.akaza-month-picker-heading
next.akaza-month-picker-nextdata-akaza-disabled
grid.akaza-month-picker-grid
gridRow.akaza-month-picker-grid-row
cell.akaza-month-picker-cellselection and availability attributes listed below
cellTrigger.akaza-month-picker-cell-triggerdata-akaza-state, data-akaza-selected, data-akaza-today, data-akaza-disabled, data-akaza-unavailable
footer.akaza-month-picker-footer

Keyboard

KeyBehavior
ArrowLeft / ArrowRightMoves one month, reversed in RTL.
ArrowUp / ArrowDownMoves one visual row using columns.
Home / EndMoves to first or last month in current row.
PageUp / PageDownMoves one year.
Shift + PageUp / Shift + PageDownMoves ten years.
Enter / SpaceSelects focused month.

Native buttons provide pointer and touch activation. Focus never scrolls the document unexpectedly.