Quarter Picker for Angular
import { AuiQuarterPicker } from '@absoluteui/angular/quarter-picker';Styles are included with the component. Behavior, keyboard and screen-reader support, design tokens, and limitations are described on the Quarter Picker page; this page covers the Angular API.
Defaults for every instance: provideAbsoluteUIConfig({ components: { quarterPicker: { ... } } }) (see Configuration).
Example
Section titled “Example”import { Component } from '@angular/core';import { FormControl, ReactiveFormsModule, Validators } from '@angular/forms';import { plainYearQuarter, type PlainYearQuarter } from '@absoluteui/core';import { AuiQuarterPicker } from '@absoluteui/angular/quarter-picker';
@Component({ selector: 'app-report', imports: [ReactiveFormsModule, AuiQuarterPicker], template: `<aui-quarter-picker label="Reporting quarter" [min]="min" [required]="true" [formControl]="quarter"></aui-quarter-picker>`,})export class ReportComponent { readonly min = plainYearQuarter(2024, 1); readonly quarter = new FormControl<PlainYearQuarter | null>(null, { validators: [Validators.required] });}<aui-quarter-picker>
Section titled “<aui-quarter-picker>”Class AuiQuarterPicker; template reference #ref="auiQuarterPicker".
Server rendering: Renders on the server; the browser re-creates it after hydration.
Angular forms: implements ControlValueAccessor and Validator; the form value is PlainYearQuarter \| 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 |
PlainYearQuarter | null |
null |
Inclusive lower bound (validation and popup). Must not be after max. |
max |
PlainYearQuarter | null |
null |
Inclusive upper bound (validation and popup). |
name |
string |
Form field name; a hidden input carries YYYY-Qn. | |
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: PlainYearQuarter | null) => string | null |
Consumer validation after the built-in checks; return a non-empty message to mark the value invalid (error ‘custom’). | |
isQuarterDisabled |
(value: PlainYearQuarter) => boolean |
Return true to disable a quarter: 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 quarter. 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 quarter is picked. |
locale |
string |
'en-US' |
Selects the quarterPicker messages (segment pattern, value, cell text and labels), month names in hints, numbers, and messages. A change rebuilds the segments and keeps the entry. |
timezone |
string |
'UTC' |
Zone used only to determine the current quarter (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)] |
PlainYearQuarter | null |
(valueChange) |
The value: [(value)] without forms; with Angular forms, bind the form control instead. |
Outputs
Section titled “Outputs”| Output | Payload | Description |
|---|---|---|
(changed) |
QuarterPickerChangeDetail |
The user changed the value or its validity error (typing, stepping, a separator, or picking a quarter). 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 quarter (or the current quarter), 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 |
YYYY-Qn, 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). |