<qds-time-picker> edits a canonical local string through a stable native input. It uses the existing QDS field lifecycle, native forms, feedback and light/dark tokens. The native editor/picker follows browser and operating-system presentation; locale controls the separate Intl summary. No framework runtime or calendar dependency is loaded.
<script type="module" src="/assets/components/time-picker/qds-time-picker.js"></script>
<qds-time-picker label="Review opening" name="opening" value="09:30" required></qds-time-picker>
.value and reset .defaultValue are strings; empty is ''. Time uses HH:mm[:ss[.SSS]]; local date-time uses YYYY-MM-DDTHH:mm[:ss[.SSS]]. Native normalization removes unnecessary zero seconds and fractional digits.min and max retain out-of-bounds values for validation; malformed values become empty/ignored. Positive step uses seconds, defaults to60 and accepts fractional seconds or 'any'. The native step base is min, then the default value, then the platform origin..value, attribute defaults, reset and state restoration are silent. Attribute/default changes update the current value only while clean; native reset restores the current default. Partial native segmented editing remains intact during feedback updates.| Member | Contract |
|---|---|
value, defaultValue |
Current/default canonical local string or empty |
min, max |
Inclusive canonical string bounds |
step |
Positive seconds number or 'any'; invalid values default to60 |
locale, formattedValue |
Intl summary locale and read-only formatted string; model unchanged |
label, aria-label, aria-labelledby |
Native/external accessible naming |
name, form |
Native form submission and external form ID |
hint, errorText, invalid |
Help and application error state |
required, readonly, disabled, size, validateOn |
Standard QDS field states and feedback timing |
validity, validationMessage, willValidate |
Field state plus badInput/rangeUnderflow/rangeOverflow/stepMismatch |
checkValidity(), reportValidity(), setCustomValidity(), focus() |
Standard validation and focus methods |
input and change contain native events and emit one composed, bubbling CustomEvent with detail { component, value }. qds-validity-change reports typed valid/validity/message detail.The adjacent demo covers forms/reset, bounds/seconds, locale, readonly/disabled, custom validation, external forms and typed events. Native and generated tests cover local values, constraints, form state, keyboard behavior and light/dark themes. Run the repository verification gate for complete acceptance checks. Existing qds-date-picker remains date-only with its existing API.
Primary contracts: HTML time and HTML local date-time.