Form
Time Picker
Usage#
import { WdsTimePickerComponent } from '@wds/angular/time-picker';Examples#
Default#
930, 14:30, 14h30, 2:30 pm) or pick it in the columns; ↑/↓ in the field step to the next or previous time and Alt+↓ opens the columns. Each column has a header and five rows with the selection in the middle; Now, Clear and OK are under them. The value is ISO text (14:30), as in <input type="time">, and wds-change sends it in detail.value.
import { Component } from '@angular/core';
import { WdsFieldComponent, WdsFieldLabelComponent } from '@wds/angular/field';
import { WdsTimePickerComponent } from '@wds/angular/time-picker';
@Component({
selector: 'app-time-picker-default-demo',
imports: [WdsFieldComponent, WdsFieldLabelComponent, WdsTimePickerComponent],
template: `
<wds-field class="w-full max-w-40">
<wds-field-label>Time</wds-field-label>
<wds-time-picker class="w-full"></wds-time-picker>
</wds-field>
`,
})
export class TimePickerDefaultDemo {}Button trigger#
trigger="button" shows an outline button with the time (or “Select time”) instead of a field to type in; it opens the columns with focus in the hours.
import { Component } from '@angular/core';
import { WdsFieldComponent, WdsFieldLabelComponent } from '@wds/angular/field';
import { WdsTimePickerComponent } from '@wds/angular/time-picker';
@Component({
selector: 'app-time-picker-button-trigger-demo',
imports: [WdsFieldComponent, WdsFieldLabelComponent, WdsTimePickerComponent],
template: `
<wds-field class="w-full max-w-48">
<wds-field-label>Check-in time</wds-field-label>
<wds-time-picker class="w-full" trigger="button" minute-step="5"></wds-time-picker>
</wds-field>
`,
})
export class TimePickerButtonTriggerDemo {}Inline#
inline shows the columns in place, always open, with Now and Clear under them. Digits jump to a value in a column (0, 7 → 07).
import { Component } from '@angular/core';
import { WdsTimePickerComponent } from '@wds/angular/time-picker';
@Component({
selector: 'app-time-picker-inline-demo',
imports: [WdsTimePickerComponent],
template: `
<wds-time-picker inline aria-label="Alarm" hour-cycle="24" value="07:30"></wds-time-picker>
`,
})
export class TimePickerInlineDemo {}Hour cycle#
en-US – 12 hours with AM/PM, pl – 24 hours); hour-cycle sets it explicitly. The value is always on the 24-hour clock.
import { Component } from '@angular/core';
import { WdsFieldComponent, WdsFieldLabelComponent } from '@wds/angular/field';
import { WdsTimePickerComponent } from '@wds/angular/time-picker';
@Component({
selector: 'app-time-picker-hour-cycle-demo',
imports: [WdsFieldComponent, WdsFieldLabelComponent, WdsTimePickerComponent],
template: `
<div class="flex flex-wrap justify-center gap-4">
<wds-field class="w-40">
<wds-field-label>24-hour</wds-field-label>
<wds-time-picker class="w-full" hour-cycle="24" value="14:30"></wds-time-picker>
</wds-field>
<wds-field class="w-40">
<wds-field-label>12-hour</wds-field-label>
<wds-time-picker class="w-full" hour-cycle="12" value="14:30"></wds-time-picker>
</wds-field>
<wds-field class="w-40">
<wds-field-label>Polish</wds-field-label>
<wds-time-picker class="w-full" locale="pl" value="14:30"></wds-time-picker>
</wds-field>
</div>
`,
})
export class TimePickerHourCycleDemo {}Full format#
seconds (or granularity="second") adds a seconds column, here every 5 seconds (second-step); with the 12-hour clock there is also an AM/PM column. The value is 19:45:00.
import { Component } from '@angular/core';
import { WdsFieldComponent, WdsFieldLabelComponent } from '@wds/angular/field';
import { WdsTimePickerComponent } from '@wds/angular/time-picker';
@Component({
selector: 'app-time-picker-full-format-demo',
imports: [WdsFieldComponent, WdsFieldLabelComponent, WdsTimePickerComponent],
template: `
<wds-field class="w-full max-w-48">
<wds-field-label>Go live at</wds-field-label>
<wds-time-picker class="w-full" seconds hour-cycle="12" second-step="5" value="19:45:00"></wds-time-picker>
</wds-field>
`,
})
export class TimePickerFullFormatDemo {}Hour only#
granularity="hour" leaves only the hour column; the value is a full hour (08:00). hour-step limits it further (e.g. every 2 hours).
import { Component } from '@angular/core';
import { WdsFieldComponent, WdsFieldDescriptionComponent, WdsFieldLabelComponent } from '@wds/angular/field';
import { WdsTimePickerComponent } from '@wds/angular/time-picker';
@Component({
selector: 'app-time-picker-hour-only-demo',
imports: [WdsFieldComponent, WdsFieldLabelComponent, WdsFieldDescriptionComponent, WdsTimePickerComponent],
template: `
<wds-field class="w-full max-w-40">
<wds-field-label>Daily digest</wds-field-label>
<wds-time-picker class="w-full" granularity="hour" trigger="button" value="08:00"></wds-time-picker>
<wds-field-description>Sent once a day at this hour.</wds-field-description>
</wds-field>
`,
})
export class TimePickerHourOnlyDemo {}Step and range#
minute-step limits the minute column, min and max disable the hours and minutes outside the window. A pick or a typed time outside them moves to the nearest allowed time. min after max is an overnight window (22:00–06:00).
import { Component } from '@angular/core';
import { WdsFieldComponent, WdsFieldDescriptionComponent, WdsFieldLabelComponent } from '@wds/angular/field';
import { WdsTimePickerComponent } from '@wds/angular/time-picker';
@Component({
selector: 'app-time-picker-step-and-range-demo',
imports: [WdsFieldComponent, WdsFieldLabelComponent, WdsFieldDescriptionComponent, WdsTimePickerComponent],
template: `
<div class="flex flex-wrap justify-center gap-4">
<wds-field class="w-44">
<wds-field-label>Start time</wds-field-label>
<wds-time-picker class="w-full" minute-step="15" min="08:30" max="17:30" value="09:00"></wds-time-picker>
<wds-field-description>Office hours, every 15 minutes.</wds-field-description>
</wds-field>
<wds-field class="w-44">
<wds-field-label>Night shift</wds-field-label>
<wds-time-picker class="w-full" minute-step="30" min="22:00" max="06:00" value="23:00"></wds-time-picker>
<wds-field-description>22:00 to 06:00.</wds-field-description>
</wds-field>
</div>
`,
})
export class TimePickerStepAndRangeDemo {}Unavailable times#
disabled-times disables single times and ranges with an exclusive end (12:00-13:00 10:30 15:00); for times from an API set isTimeDisabled, a function that gets the time as ISO text. An unavailable value makes the field invalid (customError).
import { Component } from '@angular/core';
import { WdsFieldComponent, WdsFieldDescriptionComponent, WdsFieldLabelComponent } from '@wds/angular/field';
import { WdsTimePickerComponent } from '@wds/angular/time-picker';
@Component({
selector: 'app-time-picker-unavailable-times-demo',
imports: [WdsFieldComponent, WdsFieldLabelComponent, WdsFieldDescriptionComponent, WdsTimePickerComponent],
template: `
<wds-field class="w-full max-w-48">
<wds-field-label>Appointment</wds-field-label>
<wds-time-picker
class="w-full"
trigger="button"
hour-cycle="24"
minute-step="30"
min="09:00"
max="17:30"
disabled-times="12:00-13:00 10:30 15:00"
></wds-time-picker>
<wds-field-description>Lunch 12:00–13:00; 10:30 and 15:00 are booked.</wds-field-description>
</wds-field>
`,
})
export class TimePickerUnavailableTimesDemo {}Confirm with OK#
require-confirm keeps a pick (also Now and Clear) as a draft until OK or Enter; Escape, a click outside or closing discards it and the value stays.
import { Component } from '@angular/core';
import { WdsFieldComponent, WdsFieldLabelComponent } from '@wds/angular/field';
import { WdsTimePickerComponent } from '@wds/angular/time-picker';
@Component({
selector: 'app-time-picker-require-confirm-demo',
imports: [WdsFieldComponent, WdsFieldLabelComponent, WdsTimePickerComponent],
template: `
<wds-field class="w-full max-w-48">
<wds-field-label>Publish at</wds-field-label>
<wds-time-picker class="w-full" trigger="button" require-confirm minute-step="15" value="10:00"></wds-time-picker>
</wds-field>
`,
})
export class TimePickerRequireConfirmDemo {}Actions#
actions chooses the buttons under the columns from now, clear and ok (here without Now, because the time is in another time zone); actions="" hides the row.
import { Component } from '@angular/core';
import { WdsFieldComponent, WdsFieldDescriptionComponent, WdsFieldLabelComponent } from '@wds/angular/field';
import { WdsTimePickerComponent } from '@wds/angular/time-picker';
@Component({
selector: 'app-time-picker-actions-demo',
imports: [WdsFieldComponent, WdsFieldLabelComponent, WdsFieldDescriptionComponent, WdsTimePickerComponent],
template: `
<wds-field class="w-full max-w-48">
<wds-field-label>Doors open</wds-field-label>
<wds-time-picker class="w-full" trigger="button" actions="clear ok" hour-cycle="24" minute-step="15" value="19:00"></wds-time-picker>
<wds-field-description>Venue time (Europe/Lisbon, WEST).</wds-field-description>
</wds-field>
`,
})
export class TimePickerActionsDemo {}Localization#
locale or the nearest lang) sets AM/PM and its position (下午 2:30 in Chinese), the column headers and “Now”. The columns stay left to right in right-to-left text. The field also reads Arabic-Indic and full-width digits.
import { Component } from '@angular/core';
import { WdsFieldComponent, WdsFieldLabelComponent } from '@wds/angular/field';
import { WdsTimePickerComponent } from '@wds/angular/time-picker';
@Component({
selector: 'app-time-picker-localization-demo',
imports: [WdsFieldComponent, WdsFieldLabelComponent, WdsTimePickerComponent],
template: `
<div class="flex flex-wrap justify-center gap-4">
<wds-field class="w-40" lang="de">
<wds-field-label>Deutsch</wds-field-label>
<wds-time-picker class="w-full" value="14:30"></wds-time-picker>
</wds-field>
<wds-field class="w-40" lang="zh-CN">
<wds-field-label>中文</wds-field-label>
<wds-time-picker class="w-full" hour-cycle="12" value="14:30"></wds-time-picker>
</wds-field>
<wds-field class="w-40" lang="ar" dir="rtl">
<wds-field-label>العربية</wds-field-label>
<wds-time-picker class="w-full" hour-cycle="12" value="14:30"></wds-time-picker>
</wds-field>
</div>
`,
})
export class TimePickerLocalizationDemo {}List#
variant="list" opens one list of times instead of the columns, like a select: every minute-step minutes (every 15 when the step is 1), between min and max. ↑/↓ move through the list while focus stays in the field, Enter picks. With relative-to (the start of an event) the list starts after that time and shows the length of each option, as in calendar apps.
import { Component } from '@angular/core';
import { WdsFieldComponent, WdsFieldLabelComponent } from '@wds/angular/field';
import { WdsTimePickerComponent } from '@wds/angular/time-picker';
@Component({
selector: 'app-time-picker-list-demo',
imports: [WdsFieldComponent, WdsFieldLabelComponent, WdsTimePickerComponent],
template: `
<div class="flex w-full max-w-sm items-end gap-2">
<wds-field class="flex-1">
<wds-field-label>Start</wds-field-label>
<wds-time-picker class="w-full" variant="list" minute-step="15" min="08:00" max="18:00" value="09:00"></wds-time-picker>
</wds-field>
<wds-field class="flex-1">
<wds-field-label>End</wds-field-label>
<wds-time-picker class="w-full" variant="list" minute-step="15" relative-to="09:00" value="10:30"></wds-time-picker>
</wds-field>
</div>
`,
})
export class TimePickerListDemo {}Clearable#
clearable adds a clear button to the field when a time is selected.
import { Component } from '@angular/core';
import { WdsFieldComponent, WdsFieldLabelComponent } from '@wds/angular/field';
import { WdsTimePickerComponent } from '@wds/angular/time-picker';
@Component({
selector: 'app-time-picker-clearable-demo',
imports: [WdsFieldComponent, WdsFieldLabelComponent, WdsTimePickerComponent],
template: `
<wds-field class="w-full max-w-40">
<wds-field-label>Reminder</wds-field-label>
<wds-time-picker class="w-full" clearable value="07:15"></wds-time-picker>
</wds-field>
`,
})
export class TimePickerClearableDemo {}Mobile panel#
panel="auto") the columns open in a panel at the bottom of the screen, with larger options; focus goes straight to the columns, so the on-screen keyboard stays hidden. panel="sheet" always opens the panel, panel="popup" never.
import { Component } from '@angular/core';
import { WdsFieldComponent, WdsFieldLabelComponent } from '@wds/angular/field';
import { WdsTimePickerComponent } from '@wds/angular/time-picker';
@Component({
selector: 'app-time-picker-mobile-panel-demo',
imports: [WdsFieldComponent, WdsFieldLabelComponent, WdsTimePickerComponent],
template: `
<wds-field class="w-full max-w-40">
<wds-field-label>Pickup time</wds-field-label>
<wds-time-picker class="w-full" panel="sheet" minute-step="5"></wds-time-picker>
</wds-field>
`,
})
export class TimePickerMobilePanelDemo {}Disabled, read-only and invalid#
disabled blocks the field, readonly keeps it focusable but without typing and columns, invalid on wds-field shows the error state.
import { Component } from '@angular/core';
import { WdsFieldComponent, WdsFieldErrorComponent, WdsFieldLabelComponent } from '@wds/angular/field';
import { WdsTimePickerComponent } from '@wds/angular/time-picker';
@Component({
selector: 'app-time-picker-disabled-demo',
imports: [WdsFieldComponent, WdsFieldLabelComponent, WdsFieldErrorComponent, WdsTimePickerComponent],
template: `
<div class="flex flex-wrap justify-center gap-4">
<wds-field class="w-40">
<wds-field-label>Disabled</wds-field-label>
<wds-time-picker class="w-full" disabled value="09:30"></wds-time-picker>
</wds-field>
<wds-field class="w-40">
<wds-field-label>Read-only</wds-field-label>
<wds-time-picker class="w-full" readonly value="09:30"></wds-time-picker>
</wds-field>
<wds-field class="w-40" invalid>
<wds-field-label>Invalid</wds-field-label>
<wds-time-picker class="w-full"></wds-time-picker>
<wds-field-error>Select a time.</wds-field-error>
</wds-field>
</div>
`,
})
export class TimePickerDisabledDemo {}Forms#
Integration with Angular forms. Pick the API your app uses.
Signal forms#
WdsDatePickerField also connects wds-time-picker to [formField] (a string, e.g. 14:30).
import { Component, computed, signal } from '@angular/core';
import { FormField, FormRoot, form, required } from '@angular/forms/signals';
import { WdsButtonComponent } from '@wds/angular/button';
import { WDS_FIELD } from '@wds/angular/field';
import { WdsDatePickerField } from '@wds/angular/forms';
import { WdsTimePickerComponent } from '@wds/angular/time-picker';
@Component({
selector: 'app-time-picker-signal-forms-demo',
imports: [WdsTimePickerComponent, ...WDS_FIELD, FormField, FormRoot, WdsButtonComponent, WdsDatePickerField],
template: `
<form class="flex w-sm max-w-full flex-col gap-4" [formRoot]="meetingForm">
<wds-field [invalid]="showStartError()">
<wds-field-label>Start time</wds-field-label>
<wds-time-picker class="w-40" minute-step="15" [formField]="meetingForm.start" />
<wds-field-error [errors]="showStartError() ? meetingForm.start().errors() : []" />
</wds-field>
<wds-button type="submit" class="self-start">Submit</wds-button>
<p class="m-0 font-mono text-sm text-muted-foreground">Submitted: {{ submitted() }}</p>
</form>
`,
})
export class TimePickerSignalFormsDemo {
protected readonly meeting = signal({ start: '' });
protected readonly submitted = signal('—');
protected readonly meetingForm = form(
this.meeting,
(path) => {
required(path.start, { message: 'Select a start time.' });
},
{
submission: {
action: async (form) => {
this.submitted.set(JSON.stringify(form().value()));
},
},
}
);
/** The error appears after the user leaves the field or submits the form. */
protected readonly showStartError = computed(() => this.meetingForm.start().touched() && this.meetingForm.start().invalid());
}Template-driven#
WdsDatePickerValueAccessor makes ngModel work on wds-time-picker.
import { Component, signal } from '@angular/core';
import { FormsModule, type NgForm } from '@angular/forms';
import { WdsButtonComponent } from '@wds/angular/button';
import { WDS_FIELD } from '@wds/angular/field';
import { WdsDatePickerValueAccessor } from '@wds/angular/forms';
import { WdsTimePickerComponent } from '@wds/angular/time-picker';
@Component({
selector: 'app-time-picker-template-driven-demo',
imports: [WdsTimePickerComponent, ...WDS_FIELD, FormsModule, WdsButtonComponent, WdsDatePickerValueAccessor],
template: `
<form #meetingForm="ngForm" class="flex w-sm max-w-full flex-col gap-4" (ngSubmit)="save(meetingForm)">
<wds-field [invalid]="!!start.invalid && !!start.touched">
<wds-field-label>Start time</wds-field-label>
<wds-time-picker #start="ngModel" class="w-40" name="start" minute-step="15" [(ngModel)]="meeting.start" required />
@if (start.invalid && start.touched) {
<wds-field-error>Select a start time.</wds-field-error>
}
</wds-field>
<wds-button type="submit" class="self-start">Submit</wds-button>
<p class="m-0 font-mono text-sm text-muted-foreground">Submitted: {{ submitted() }}</p>
</form>
`,
})
export class TimePickerTemplateDrivenDemo {
protected readonly meeting = { start: '' };
protected readonly submitted = signal('—');
protected save(form: NgForm): void {
if (form.invalid) {
form.form.markAllAsTouched();
return;
}
this.submitted.set(JSON.stringify(form.value));
}
}Reactive forms#
WdsDatePickerValueAccessor works with formControl and formControlName.
import { Component, signal } from '@angular/core';
import { FormControl, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms';
import { WdsButtonComponent } from '@wds/angular/button';
import { WDS_FIELD } from '@wds/angular/field';
import { WdsDatePickerValueAccessor } from '@wds/angular/forms';
import { WdsTimePickerComponent } from '@wds/angular/time-picker';
@Component({
selector: 'app-time-picker-reactive-forms-demo',
imports: [WdsTimePickerComponent, ...WDS_FIELD, ReactiveFormsModule, WdsButtonComponent, WdsDatePickerValueAccessor],
template: `
<form class="flex w-sm max-w-full flex-col gap-4" [formGroup]="meetingForm" (ngSubmit)="save()">
<wds-field [invalid]="start.invalid && start.touched">
<wds-field-label>Start time</wds-field-label>
<wds-time-picker class="w-40" minute-step="15" formControlName="start" />
@if (start.invalid && start.touched) {
<wds-field-error>Select a start time.</wds-field-error>
}
</wds-field>
<wds-button type="submit" class="self-start">Submit</wds-button>
<p class="m-0 font-mono text-sm text-muted-foreground">Submitted: {{ submitted() }}</p>
</form>
`,
})
export class TimePickerReactiveFormsDemo {
protected readonly meetingForm = new FormGroup({
start: new FormControl('', { nonNullable: true, validators: [Validators.required] }),
});
protected readonly start = this.meetingForm.controls.start;
protected readonly submitted = signal('—');
protected save(): void {
if (this.meetingForm.invalid) {
this.meetingForm.markAllAsTouched();
return;
}
this.submitted.set(JSON.stringify(this.meetingForm.getRawValue()));
}
}API References#
wds-time-picker#
14:30, 1430, 14h30, 2:30 pm)
or picked in the columns. The value is ISO text (14:30, with seconds 14:30:15), as in <input type="time">.
On phones the columns open in a panel at the bottom of the screen (panel).
Each column has a header and shows five rows (--wds-time-picker-rows); the selected row stays in the middle.
Under the columns are Now, Clear and OK (actions). granularity sets the columns (hour, minute, second),
hour-step, minute-step and second-step the values in them, min/max the window (min after max is an
overnight window, 22:00–06:00) and disabled-times or isTimeDisabled the unavailable times. A pick that is not
allowed moves to the nearest allowed time; so does a typed time.
trigger="button" shows an outline button instead of a field to type in, inline shows the columns in place
(always open), and require-confirm keeps a pick as a draft until OK (Escape or closing discards it).
A form control: name submits the time; required, min, max, the steps and the unavailable times validate
as in a native field, and text that is not a valid time gives badInput.
With variant="list" the popup is one list of times, like a select: every minute-step minutes (every 15 when the
step is 1), from min to max. With relative-to (such as the start of an event) the list starts after that time
and shows the length of each option, as in calendar apps.
Keyboard: ↑/↓ in the field step to the next or previous allowed time, Alt+↓ opens the columns. In a column ↑/↓ change
the value, digits jump to it (1, 4 → 14), ←/→ move between columns, Enter (or Alt+↑) confirms and Escape closes,
both returning to the field. In the list variant ↓ opens the list and ↑/↓ move through it (focus stays in the field),
Home/End go to the first or last time, Enter picks and Escape closes.
Attributes
| Attribute | Type | Default | Description |
|---|---|---|---|
| value | string | '' | 14:30 or 14:30:15). |
| min | string | '' | 08:00). After max the window runs overnight (22:00 to 06:00). |
| max | string | '' | 18:00). |
| granularity | WdsTimeGranularity | 'minute' | hour (14:00), minute or second (14:30:15). |
| hour-step.hourStep | number | 1 | |
| minute-step.minuteStep | number | 1 | |
| second-step.secondStep | number | 1 | |
| disabled-times.disabledTimes | string | '' | 12:00-13:00 15:30. |
| require-confirm.requireConfirm | boolean | false | |
| actions | string | 'now clear ok' | now, clear and ok (OK only in the popup or with require-confirm); empty hides the row. |
| variant | WdsTimePickerVariant | 'columns' | columns: hour and minute columns; list: one list of times, like a select. |
| trigger | WdsTimePickerTrigger | 'input' | input: a field to type in; button: an outline button with the time that opens the columns. |
| inline | boolean | false | |
| relative-to.relativeTo | string | '' | list: the list starts after this time (09:00) and each option shows its length from it, such as for the end of an event. |
| seconds | boolean | false | 14:30:15); the same as granularity="second". |
| hour-cycle.hourCycle | 12 | 24 | undefined | 12 or 24-hour clock. Defaults to the language (en-US → 12). | |
| panel | WdsPickerPanel | 'auto' | auto (a popup, on phones a panel at the bottom), popup or sheet. |
| locale | string | '' | en-US): AM/PM, its position, the column headers and Now. Defaults to the nearest lang attribute. |
| placeholder | string | '' | hh:mm (with trigger="button" Select time). |
| name | string | '' | |
| required | boolean | false | valueMissing when empty). |
| disabled | boolean | false | |
| readonly | boolean | false | |
| invalid | boolean | false | |
| clearable | boolean | false | trigger="input"). |
| open | boolean | false |
Properties
| Property | Description |
|---|---|
| isTimeDisabled((value: string) => boolean) | null | granularity. |
Events
| Event | Description |
|---|---|
| wds-changeCustomEvent<WdsTimePickerChangeDetail> | |
| wds-open-changeCustomEvent<WdsTimePickerOpenChangeDetail> |
Methods
| Method | Description |
|---|---|
| show() | |
| close() | |
| focus(options?: FocusOptions) | |
| formResetCallback() | |
| formDisabledCallback(disabled: boolean) | |
| checkValidity() | true when the value is valid; otherwise fires invalid on the element. |
| reportValidity() | checkValidity(), and shows the browser validation bubble when the value is invalid. |
| setCustomValidity(message: string) | input.setCustomValidity(). |
CSS parts (::part)
| Part | Description |
|---|---|
| field | trigger="button" the button). |
| input | <input>. |
| clear | |
| trigger | trigger="button" the whole button). |
| popup | |
| panel | inline). |
| time | |
| time-column | |
| time-label | |
| time-option | |
| footer | |
| action | action-now, action-clear, action-ok. |
| list | list). |
| list-option | list). |
CSS custom properties
| Property | Description |
|---|---|
| --wds-time-picker-width | |
| --wds-time-picker-rows | |
| --wds-time-picker-fade-size | |
| --wds-time-picker-height | list, default 16rem). |
Accessibility#
Screen reader#
role="combobox" with aria-haspopup="dialog" and aria-expanded; the format (e.g. hh:mm) is its description. Give it a name with wds-field-label or aria-label (fallback: Time). With trigger="button" it is a button named by the label and the time.
role="dialog". Each column is a listbox named by its header (“Hour”, “Minute”, “Second”, “AM/PM”, in the language of the page) and described by the whole time; its active option is announced with aria-activedescendant, and options outside min/max or unavailable have aria-disabled. inline columns are in a group.
variant="list" the field has aria-haspopup="listbox" and the popup is a listbox of options; the highlighted time is announced with aria-activedescendant and the chosen one has aria-selected.
invalid, required and a typed text that is not a time set aria-invalid / aria-required. In a form the time is submitted under name.
Keyboard support#
| Key | Function |
|---|---|
require-confirm) and returns to the field. | |
require-confirm the draft is discarded. | |
variant="list": ↓ opens the list; in the open list the previous or next time, the first or the last (focus stays in the field). |