Props
| Name | Description |
|---|---|
adaptive Type: booleanDefaultconfig.adaptive (true) | On mobile the time columns open inside a bottom off-canvas sheet instead of a floating popover. When unset, falls back to the global Set it per instance only to disagree with the app-wide |
ampm Type: booleanDefaultfalse | 12-hour display with an AM/PM segment. Purely a field-composition concern: the model stays 24-hour. Type Display only: the model still holds 24-hour text, so a form submits the same value whichever way the field shows it. See example |
append:icon Type: string | Name of the icon to be added at the end of the input. |
autocomplete Type: stringDefault"off" | Guides the browser as to the type of information expected in the field. |
autofocus Type: Booleanish | Focuses the field when it mounts (a dialog already open included), unless the user is typing in another field. |
clearable Type: booleanDefaultfalse | Displays a clear button when the input has a value and is being interacted with. |
compact Type: booleanDefaultfalse | Compact density: the field uses the |
description Type: string | Descriptive text displayed below the label and above the input. Always visible and linked to the input via |
disabled Type: booleanDefaultfalse | Disables the component. |
disableWriting Type: boolean | "mobile" | "desktop"Defaultfalse | Disables typing into the input. Use Reach for |
errors Type: string | string[] | Error messages under the field, a string or string array. They render in an |
formless Type: booleanDefaultfalse | Keep this control out of the enclosing |
hasErrors Type: booleanDefaultfalse | Define if the component should be in an error state. It usually attaches a CSS class for styling purposes. |
hasWarnings Type: booleanDefaultfalse | Define if the component should be in a warning state. Same chrome as errors with |
hideLabel Type: booleanDefaultfalse | Visually hides the label of the input while maintaining accessibility. |
hint Type: string | Text box to be displayed near the input, usually to indicate instructions. |
id Type: string | The |
inputAlign Type: FieldCrossAlign | Vertical position of the control in a side-by-side row; not |
label requiredType: string | Text content of the label of the element. |
labelAlign Type: FieldCrossAlign | Vertical position of the label block in a side-by-side row; not |
labelMode Type: "outside" | "floating" | "inside" | Label rendering mode. |
labelPosition Type: "left" | "center" | "right" | Sets the text alignment of the label. |
layout Type: Responsive<FieldLayout> | How label and input sit together: |
loading Type: booleanDefaultfalse | Sets the component in a loading state, usually triggering some visual styles. |
max Type: string | Maximum selectable time, Later times are disabled in the columns. A typed value past the bound is clamped on commit and reported through |
min Type: string | Minimum selectable time, Earlier times are disabled in the columns. A typed value before the bound is clamped on commit and reported through |
modelValue Type: string | string[] | null | v-model value: |
name Type: string | Defines the name of the input.
|
offCanvasProps Type: Partial<BbOffCanvasProps> | Props for the phone sheet (the |
persistentHint Type: booleanDefaultfalse | Keeps the hint displayed. |
placeholder Type: string | Text shown while the field is empty. |
prepend:icon Type: string | Name of the icon to be added at the start of the input. |
pt Type: (PtMap<BbTimePickerInputPtPart, BbTimePickerInputPtState> & { "root:outline"?: PtValue | undefined; "icon:outline"?: PtValue | undefined; "root:secondary"?: PtValue | undefined; "icon:secondary"?: PtValue | undefined; "spinner:outline"?: PtValue | undefined; "spinner:secondary"?: PtValue | undefined; "clear:outline"?: PtValue | undefined; "clear:secondary"?: PtValue | undefined; "root:ghost"?: PtValue | undefined; "icon:ghost"?: PtValue | undefined; "spinner:ghost"?: PtValue | undefined; "clear:ghost"?: PtValue | undefined; "label:outline"?: PtValue | undefined; "label:secondary"?: PtValue | undefined; "label:ghost"?: PtValue | undefined; "description:outline"?: PtValue | undefined; "description:secondary"?: PtValue | undefined; "description:ghost"?: PtValue | undefined; "message:outline"?: PtValue | undefined; "message:secondary"?: PtValue | undefined; "message:ghost"?: PtValue | undefined; "hint:outline"?: PtValue | undefined; "hint:secondary"?: PtValue | undefined; "hint:ghost"?: PtValue | undefined; "input:outline"?: PtValue | undefined; "input:secondary"?: PtValue | undefined; "input:ghost"?: PtValue | undefined; "box:outline"?: PtValue | undefined; "box:secondary"?: PtValue | undefined; "box:ghost"?: PtValue | undefined; "prefix:outline"?: PtValue | undefined; "prefix:secondary"?: PtValue | undefined; "prefix:ghost"?: PtValue | undefined; "suffix:outline"?: PtValue | undefined; "suffix:secondary"?: PtValue | undefined; "suffix:ghost"?: PtValue | undefined; "activator:outline"?: PtValue | undefined; "activator:secondary"?: PtValue | undefined; "activator:ghost"?: PtValue | undefined; }) | Passthrough, object form: the same keys as the |
pt:<part> Type: PtValue | Passthrough, attribute form: one attribute per part, |
range Type: booleanDefaultfalse | Range selection: v-model expects a two-element array Keep the model an array: seed and clear it with |
readonly Type: booleanDefaultfalse | Sets the input in a readonly state. |
required Type: booleanDefaultfalse | Sets the input as required. |
reverse Type: booleanDefaultfalse | Reverses the layout: the order of the label and the input is swapped. |
rules Type: RuleExpression<string | string[] | null> | vee-validate rules for this field. Only inside a |
seconds Type: booleanDefaultfalse | Adds the seconds segment. Without it an incoming value carrying seconds displays truncated and zeroes out on the next user commit. See example |
step Type: numberDefault1 | Minute granularity for the popover minute column. Constrains what the columns produce, never what typing accepts; ArrowUp/Down on a segment always step by 1. See example |
transitionDuration Type: number | Transition duration, in milliseconds, for the popover appearance. |
validationLabel Type: string | The field's name in validation messages ( |
validationMode Type: ValidationMode | When the field validates: |
variant Type: InputVariantTypeDefault'outline' | The field box's look, with |
warnings Type: string | string[] | Warning messages under the field, a string or array: amber, in their own |
v-model
Values kept in sync through v-model.
| Name | Description |
|---|---|
modelValue Type: string | string[] | null | A wall-clock string with no date or timezone. Never parse it with |
Events
| Name | Description |
|---|---|
active Type: (): void | Emitted when the composite control receives focus. |
error Type: (error: TimePickerInputError): void | Emitted on every normalization (clamped time, swapped range). Fires when a commit was corrected: |
focus Type: (event: FocusEvent): void | Emitted when a native text field inside the control gains focus. |
hide Type: (): void | Emitted as soon as the time panel starts to close. |
inactive Type: (): void | Emitted when focus/click moves outside the composite control. |
show Type: (): void | Emitted as soon as the time panel (the popover, or the sheet on a phone) starts to open. |
shown Type: (): void | Emitted once the time panel is open and its open transition has finished. |
update:modelValue Type: (value: string | string[] | null): void | Emitted whenever the selected time changes. |
Slots
The listed properties are the ones exposed to the slot scope.
| Name | Description |
|---|---|
append Type: object | Content rendered after the time fields (before the clock button). |
append:outer Type: object | Content rendered after the entire control, outside the input chrome. |
description Type: BbTimePickerInputDescriptionSlotProps | Replaces the description text. Provided alone (no |
label Type: BbTimePickerInputLabelSlotProps | Replaces the default label text rendered above the input. |
prefix Type: object | Inline content at the start of the field area. |
prepend Type: object | Content rendered before the time fields, at the start of the field box. |
prepend:outer Type: object | Content rendered before the entire control, outside the input chrome. |
suffix Type: object | Inline content at the end of the field area. |
Renamed and removed
Names from v2 and from earlier 3.0 betas that no longer work, and what to write instead.
- slot
append-outerappend:outerfails silently directionlayoutfails silentlyhasWarninghasWarningsfails silently- slot
prepend-outerprepend:outerfails silently validateOnvalidationModefails silentlyAn array of events became one mode (
aggressive|balanced|lazy|submit-only|submit-live). The old defaults (['blur'],['inactive'], a toggle's['update:modelValue', 'change', 'blur']) arebalanced, the new default: delete the prop. A text field on['update:modelValue']isvalidation-mode="aggressive". Set it once on<BbForm validation-mode>instead of per field.vidremovedfails silentlyA display name (v2:
vid="Email address") is nowvalidation-label; a field path (3.0 betas:vid="address.city") is nowname(brackets for a native post:address[city]).check --fixpicks by the value.