AppTimePicker
A time-of-day field with a scrollable listbox — the one way to capture a time.
<app-time-picker label="Schedule time" name="scheduleTime" />A time picker captures a time of day (hours and minutes) through a scrollable listbox — a meeting time, a schedule slot, a booking time. <app-time-picker> is the one way to capture a time; never fall back to a raw <input type="time">, whose look and behaviour change with every browser and operating system.
It renders the shared <wui-timepicker> control and takes its look entirely from @webority/theme, so the Razor <app-time-picker> and the React <AppTimePicker> render an identical listbox on every Webority surface.
Playground
Every attribute, live. Each change re-renders the real tag helper on the server, so the markup underneath is the exact call that produced the field above it.
Value and onChange
The field is form-associated — value seeds the initial time string (HH:mm in 24-hour format) and it posts the chosen time under name. The element also dispatches a native change event you can listen for. Store and compare the HH:mm string, never a localized label.
Show code
<app-time-picker label="Schedule time" name="scheduleTime" />
<input type="time"> renders a different widget in every browser and OS, and can't match the portal's chrome. <app-time-picker> gives one listbox everywhere, styled from the shared theme.Min and max
Constrain the selectable window with min and max — the listbox skips everything outside it, so an invalid time is impossible to pick.
Business hours only (09:00–17:00) — times outside the window can't be picked.
Show code
<app-time-picker label="Meeting time" name="meetingTime" value="14:30" min="09:00" max="17:00" />
Step
step sets the granularity (in minutes) — how many minutes between options in the listbox. Default is 30 minutes.
Show code
<app-time-picker label="30-minute step" name="step30" /> <app-time-picker label="15-minute step" name="step15" step="15" />
Display format
format sets how times are displayed: '24' (default) shows 14:30, '12' shows 2:30 PM. The wire value is always 24-hour HH:mm.
Show code
<app-time-picker label="24-hour" name="fmt24" format="24" /> <app-time-picker label="12-hour" name="fmt12" format="12" />
Placeholder
placeholder sets the empty-state hint inside the field. It supplements a label — it never replaces one.
Show code
<app-time-picker label="Booking time" name="bookingTime" placeholder="Pick a meeting time" />
Width
The field defaults to a fixed, compact width — a time is a single short value. Resize it with a time-w-* class (time-w-sm, time-w-md, time-w-lg, time-w-full), or set the --wui-timepicker-width variable to any value.
Show code
<app-time-picker label="Small" class="time-w-sm" /> <app-time-picker label="Large" class="time-w-lg" /> <app-time-picker label="Full" class="time-w-full" />
Sizes
size sets the control height — sm, md (default), lg — reusing AppInput's tiers so a time field lines up with the inputs beside it.
Show code
<app-time-picker label="Small" size="sm" /> <app-time-picker label="Medium" /> <app-time-picker label="Large" size="lg" />
When to use
Use it when
- Capturing a time of day — a meeting time, a schedule slot, a booking time.
- You need one consistent time picker across every browser and both surfaces.
- Restricting selection to a valid window with min / max.
- Controlling step granularity (15, 30, or 60 minutes).
Reach for something else when
- You need both a date and a time. → AppDatePicker + AppTimePicker
- The value is free text, not a time. → AppInput
- You are picking from a fixed list of labels. → AppSelect
Every option
The whole surface of the component, one cell per value — every format, size, and combined state.
format — 24 vs 12-hour display
format="24"
format="12"
size — every height tier
(default) md
size="sm"
size="lg"
min / max — restricted windows
min="09:00" max="17:00"min="00:00" max="12:00" (morning only)step — granularity in minutes
step="15"
step="30"
step="60"
state — empty, disabled, error, required
(empty, no value)disablederrorrequired + errorhintbare (no label/hint/error)Attributes
| Attribute | Type | Default | Description |
|---|---|---|---|
| label | string | — | Field label above the control. |
| name | string | — | Form field name — the key the value posts under. |
| value | string | — | Selected time as a HH:mm string (24-hour format). |
| min | string | — | Earliest selectable time (HH:mm). Times before it are disabled. |
| max | string | — | Latest selectable time (HH:mm). Times after it are disabled. |
| step | number | 30 | Step granularity in minutes — how many minutes between options in the listbox. |
| format | 12 | 24 | 24 | Display format: 12-hour or 24-hour. Wire format is always 24-hour HH:mm. |
| placeholder | string | Select time | Empty-state text inside the field. |
| required | bool | false | Renders the required asterisk on the label. |
| hint | string | — | Helper text below the control (hidden when error is present). |
| error | string | — | Validation message; replaces the hint and marks the field invalid. |
| size | string | — | Control height tier: sm / lg. Omit for the default (md). |
| disabled | bool | false | Disables the field. |
| input-class | string | — | Extra classes on the control itself (the wui-timepicker) — the React className counterpart. The plain class attribute merges onto the .field wrapper instead. |