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

Anatomie

Décomposition visuelle de la structure interne du composant avec les appels de classes BEM.

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

Toutes les props acceptées par ce composant, avec leur type, valeur par défaut et 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

Emplacements de contenu exposés par ce composant.

#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

Événements émis par ce composant.

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

API

Membres exposés

Propriétés et méthodes accessibles via ref template (defineExpose). Utilisés pour le contrôle programmatique.

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

Personnalisation

Variables CSS

Propriétés CSS personnalisées exposées par ce composant. Surchargez-les pour personnaliser sans perdre la compatibilité avec le thème.

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

Inclusion

Accessibilité

Rôles ARIA, navigation clavier et gestion du focus. Sourcé depuis le template réel du composant.

Rôles ARIA

button

Interactions clavier

Interactions clavier
ToucheAction
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.

Fondation

Design tokens

Extrait des tokens de ce composant — les variables --origam-<composant>---<propriété>, déclarées dans sa feuille de tokens tenue à la main, sans étape de build.

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

Interactif

Playground

Modifiez les props en direct et observez le composant se mettre à jour. Le snippet de code généré suit vos changements.

Rendu de l’aperçu en cours…

Usage

Exemples

Extraits de code prêts à coller dans vos templates.

Standalone month picker

vue

With min/max constraints

vue

Écosystème

Famille

Composants du même dossier qui partagent les conventions et se composent souvent ensemble.