DatePickerMonths

Form & Input
stable

Month-grid view for picking a month within a given year. Renders 12 month buttons in a 2-column grid with min/max constraint support.

Structure

Anatomy

Visual breakdown of the component's internal structure with BEM class call-outs.

Anatomy of OrigamDatePickerMonthsSchematic of the DatePickerMonths component showing a 2-column grid of 12 month buttons. Jan Feb Mar Apr May Jun … (Jul – Dec) 1 2 3
Anatomy of <origam-date-picker-months> — 3 parts: ① root container (288px default height), ② the 2-column grid content wrapper, ③ the active month button highlighted with the color prop.
1.origam-date-picker-months
Root container. Fixed height (288px by default). Overflow hidden.
2.origam-date-picker-months__content
2-column CSS grid with justify-content: space-around. padding-inline: 36px. grid-gap: 0 24px. Inner OrigamBtn elements have text-transform: none.
3OrigamBtn (active)
The currently selected month button. Receives active=true and color=props.color. All buttons have rounded=true.

API

Props

All props accepted by this component, with their type, default value and description.

min
unknown
Minimum selectable date. Months whose end falls before this value are disabled.
max
unknown
Maximum selectable date. Months whose start falls after this value are disabled.
month
number
Currently selected month (0-based: 0 = January). Used to highlight the active tile.
year
number
Year for which the 12 months are displayed. Changes which months are enabled/disabled against min/max.
id
string
class
string | Array<string> | object
style
string | Array<string> | object | StyleValue
color
Intent or custom colour applied to the active month button.
height
number | string
288px
Height of the months grid container. Defaults to 288px (matches the default DatePicker calendar area height).
maxHeight
number | string
maxWidth
number | string
minHeight
number | string
minWidth
number | string
width
number | string

API

Slots

Content slots exposed by this component.

#month
Custom month tile. Slot props expose the month descriptor, its index (0–11) and the bound button props (active, color, disabled, rounded, text, onClick).

API

Emits

Events emitted by this component.

@update:month
number
Fired when a month tile is clicked. Payload is the 0-based month index.

API

Exposed members

Properties and methods accessible via template ref (defineExpose). Use them for programmatic control.

<T extends object>(props: T, exclude?: string[]) => Partial<T>
Utility to forward a filtered subset of props.
Ref<string>
Reactive CSS string generated by useStyle.
string
Unique style-sheet ID for this instance.
() => void
Injects the computed style sheet into the document.
() => void
Removes the injected style sheet from the document.
Ref<boolean>
True once the style sheet has been injected.

Customisation

CSS variables

CSS custom properties exposed by this component. Override them to customise the component without losing theme compatibility.

Container height. Overridden via the height prop (IDimensionProps).

Inclusion

Accessibility

ARIA roles, keyboard navigation and focus management. Sourced from the real component template.

ARIA roles

button

Keyboard interactions

Keyboard interactions
KeyAction
Enter / SpaceSelects the focused month.
TabMoves focus between month tiles.

Notes

  • Months outside the min/max range receive disabled=true on the inner OrigamBtn and are skipped in keyboard navigation.

Foundation

Design tokens

Excerpt from this component's token declarations — the --origam-<component>---<property> variables, declared in its hand-maintained token sheet with no build step.

Source
color
var(--origam-color__action--primary---bg)
Active month button background (driven by the color prop).

Interactive

Playground

Edit props live and see the component update in real time. The generated code snippet updates as you change values.

Rendering the live preview…

Usage

Examples

Ready-to-paste code snippets for your templates.

Standalone month picker

vue

With min/max constraints

vue

Ecosystem

Family

Components from the same folder that share conventions and often compose together.