Month Picker for Angular
Introduction
Section titled “Introduction”Enter a calendar month without a day (PlainYearMonth) in locale-ordered month and year segments inside a labelled group, or pick one from a non-modal dialog popup with a grid of the twelve months of a year (paged by year), with min/max bounds, unavailable months, localized validation, and native form submission as ISO 8601 YYYY-MM.
- Month and yearPick a month of a year from a grid or type it.
- Limits and disabled monthsEarliest and latest months plus a function to block any month.
- Locale awareMonth names follow the locale.
- Form readyValidation, custom errors, and native form submission.
Behavior, design tokens, and limitations are described on the Month Picker page; this page covers the Angular API.
Live example
Section titled “Live example”import { Component } from '@angular/core';import { FormControl, ReactiveFormsModule, Validators } from '@angular/forms';import { plainYearMonth, type PlainYearMonth } from '@absoluteui/core';import { AuiMonthPicker } from '@absoluteui/angular/month-picker';
@Component({ selector: 'app-billing', imports: [ReactiveFormsModule, AuiMonthPicker], template: `<aui-month-picker label="Billing month" [min]="min" [required]="true" [formControl]="month"></aui-month-picker>`,})export class BillingComponent { readonly min = plainYearMonth(2024, 1); readonly month = new FormControl<PlainYearMonth | null>(null, { validators: [Validators.required] });}Install and start
Section titled “Install and start”npm install @absoluteui/angular @absoluteui/components @absoluteui/core @absoluteui/themeSetup with provideAbsoluteUI() is covered in Getting started. Styles are included with the component.
import { AuiMonthPicker } from '@absoluteui/angular/month-picker';Defaults for every instance: provideAbsoluteUIConfig({ components: { monthPicker: { ... } } }) (see Configuration).
API reference
Section titled “API reference”<aui-month-picker>
Section titled “<aui-month-picker>”Class AuiMonthPicker; template reference #ref="auiMonthPicker".
Server rendering: Renders on the server; the browser re-creates it after hydration.
Angular forms: implements ControlValueAccessor and Validator; the form value is PlainYearMonth \| null. Bind [formControl], formControlName, or [(ngModel)]; validation messages of the component report through the aui error key. See Forms.
Inputs
Section titled “Inputs”| Input | Type | Default | Description |
|---|---|---|---|
label |
string |
Required. Visible label and accessible name of the group (via aria-labelledby). Must be a non-empty string. | |
hideLabel |
boolean |
false |
Visually hide the label; it remains the accessible name. |
min |
PlainYearMonth | null |
null |
Inclusive lower bound (validation and popup). Must not be after max. |
max |
PlainYearMonth | null |
null |
Inclusive upper bound (validation and popup). |
name |
string |
Form field name; a hidden input carries the ISO 8601 month (YYYY-MM). | |
description |
string |
Help text (text only) referenced by the group’s aria-describedby. | |
required |
boolean |
false |
An empty entry is invalid (value-missing); segments are required and the required indicator is shown. |
disabled |
boolean |
false |
Disables the segments and the button; the popup does not open and the value is not submitted. |
readOnly |
boolean |
false |
Focusable and submitted, but not editable; the popup does not open. |
validate |
(value: PlainYearMonth | null) => string | null |
Consumer validation after the built-in checks; return a non-empty message to mark the value invalid (error ‘custom’). | |
isMonthDisabled |
(value: PlainYearMonth) => boolean |
Return true to disable a month: focusable in the popup but not selectable; typed, it is invalid (error ‘unavailable’). | |
today |
PlainDate |
Advanced: fixed today instead of the current date in timezone; it decides the current month. For tests, server rendering, and demos with a fixed clock. | |
icons |
Partial<PeriodPickerIcons> |
Icon slot overrides: calendar, previous, next, error. | |
validationTiming |
ValidationTiming |
'blur' |
When validation messages first appear; afterwards they update live. |
closeOnSelect |
boolean |
true |
Close the popup after a month is picked. |
locale |
string |
'en-US' |
Segment order and separators, month names, headings, labels, and messages. A change rebuilds the segments and keeps the entry. |
timezone |
string |
'UTC' |
Zone used only to determine the current month (aria-current and default focus). |
direction |
"ltr" | "rtl" |
'ltr' |
Popup and grid direction: grid arrow-key mirroring, chevrons, and popup alignment (applied when the popup opens). |
Two-way bindings
Section titled “Two-way bindings”| Model | Type | Change output | Description |
|---|---|---|---|
[(value)] |
PlainYearMonth | null |
(valueChange) |
The value: [(value)] without forms; with Angular forms, bind the form control instead. |
Outputs
Section titled “Outputs”| Output | Payload | Description |
|---|---|---|
(changed) |
MonthPickerChangeDetail |
The user changed the value or its validity error (typing, stepping, a separator, or picking a month). Re-emits aui-change. |
(opened) |
null |
The popup opened. Re-emits aui-open. |
(closed) |
null |
The popup closed. Re-emits aui-close. |
Read-only state
Section titled “Read-only state”| Property | Type | Description |
|---|---|---|
isOpen |
Signal<boolean> |
Whether the popup is open. |
Methods
Section titled “Methods”Call them through a viewChild query or a template reference.
| Method | Description |
|---|---|
open(): void |
Open the popup and focus the selected month (or the current month), clamped to min/max. No-op when open, disabled, or read-only. |
close(): void |
Close the popup; focus inside it returns to the button. |
reportValidity(): boolean | undefined |
Show messages now (for every validation timing) and return validity. |
setCustomError(message: string | null): void |
External error (server, cross-field rule); null or ‘’ clears it; cleared when the user edits. |
getFormValue(): string | null | undefined |
ISO 8601 YYYY-MM, or null when the value is null. |
focus(): void |
Focus the first segment. |
reset(): void |
Close, restore the initial value, and clear dirty/touched/submitted state (no events). |
Accessibility and performance
Section titled “Accessibility and performance”Pattern: Segmented month field in a labelled group with a button that opens a non-modal dialog popup (WAI-ARIA APG date picker dialog pattern, non-modal variant) containing a paged role=grid of months with a roving tabindex.
The Angular component renders the framework-neutral component, so its keyboard support, roles, WCAG 2.2 criteria, budgets, and import cost apply unchanged: see Month Picker: Accessibility and performance.
(c) 2026 Kasadara Technology Solutions Pvt Ltd. AbsoluteUI is free to use under the AbsoluteUI Free Use License; it is not open source.