Skip to content

Schedule Picker for Angular

AngularDate and Time

Choose when something happens in one form control: start and end (DateTime Pickers, or Date Pickers for all-day), an all-day checkbox, an optional timezone select, and an optional embedded Recurrence Picker. The value is a ScheduleValue (instants with a timezone, or dates) and the form value is iCalendar text (DTSTART, DTEND, RRULE, EXDATE).

  • Start and endPick when something starts and ends, with the duration shown.
  • All-day eventsSwitch between timed schedules and whole days.
  • Time zonesChoose the time zone the schedule is planned in.
  • RepeatsAn optional recurrence rule turns a single event into a series.
  • Text round tripSchedules convert to and from text for storage.

Behavior, design tokens, and limitations are described on the Schedule Picker page; this page covers the Angular API.

import { Component } from '@angular/core';
import { FormControl, ReactiveFormsModule } from '@angular/forms';
import type { ScheduleValue } from '@absoluteui/components/schedule-picker';
import { AuiSchedulePicker } from '@absoluteui/angular/schedule-picker';
@Component({
selector: 'app-when',
imports: [ReactiveFormsModule, AuiSchedulePicker],
template: `<aui-schedule-picker label="When" [recurrence]="true" [timeZones]="zones" [formControl]="when"></aui-schedule-picker>`,
})
export class WhenComponent {
readonly zones = ['Europe/London', 'America/New_York'];
readonly when = new FormControl<ScheduleValue | null>(null);
}
Terminal window
npm install @absoluteui/angular @absoluteui/components @absoluteui/core @absoluteui/theme

Setup with provideAbsoluteUI() is covered in Getting started. Styles are included with the component.

import { AuiSchedulePicker } from '@absoluteui/angular/schedule-picker';

Defaults for every instance: provideAbsoluteUIConfig({ components: { schedulePicker: { ... } } }) (see Configuration).

Class AuiSchedulePicker; template reference #ref="auiSchedulePicker".

Server rendering: Renders on the server; the browser re-creates it after hydration.

Angular forms: implements ControlValueAccessor and Validator; the form value is ScheduleValue \| null. Bind [formControl], formControlName, or [(ngModel)]; validation messages of the component report through the aui error key. See Forms.

Input Type Default Description
label string Required. Legend of the fieldset (required accessible name).
hideLabel boolean false Visually hide the legend.
allowAllDay boolean true Offer the all-day checkbox.
timeZones readonly string[] Timezones offered in a select; omitted: no select.
recurrence boolean false Embed a Recurrence Picker (read at creation).
name string Form field name of the hidden input (iCalendar text).
description string Help text referenced by the fieldset.
required boolean false An empty schedule is invalid.
disabled boolean false Disables every part; not submitted.
firstDayOfWeek IsoWeekday First column of the calendars and weekday toggles.
validate (value: ScheduleValue | null) => string | null Consumer validation after built-in checks.
icons Partial<SchedulePickerIcons> Icon slot overrides.
validationTiming ValidationTiming 'blur' When validation messages first appear.
defaultDuration number '60' Minutes of a new timed schedule after switching off all-day.
locale string 'en-US' Month and weekday names, dates, numbers, the first day of the week, and messages.
timezone string 'UTC' Timezone of the wall-clock times when the value has none and no select is shown.
disambiguation Disambiguation 'compatible' DST policy for wall-clock times in a gap or overlap.
direction "ltr" | "rtl" 'ltr' Reading direction; Left/Right arrow keys and chevrons follow it.
Model Type Change output Description
[(value)] ScheduleValue | null (valueChange) The value: [(value)] without forms; with Angular forms, bind the form control instead.
Output Payload Description
(changed) SchedulePickerChangeDetail The user changed a part of the schedule or its validity error. Re-emits aui-change.

Call them through a viewChild query or a template reference.

Method Description
reportValidity(): boolean | undefined Show messages now and return validity.
setCustomError(message: string | null): void External error; cleared on the next edit.
getFormValue(): string | null | undefined iCalendar text, or null.
focus(): void Focus the start.
reset(): void Restore the initial value.

Pattern: A fieldset composing labelled pickers (APG date picker dialogs), a native checkbox and select, and an optional Recurrence Picker fieldset.

The Angular component renders the framework-neutral component, so its keyboard support, roles, WCAG 2.2 criteria, budgets, and import cost apply unchanged: see Schedule Picker: Accessibility and performance.