Skip to content

BbTimePickerInput

Segmented time field with hour/minute columns; 24-hour string model.

import { BbTimePickerInput } from 'bitboss-ui';

On this page

Props

NameTypeDefaultDescription
adaptiveboolean | undefined`config.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 config.adaptive.

ampmboolean | undefinedfalse

12-hour display with an AM/PM segment. Purely a field-composition concern: the model stays 24-hour. Type A/P (or ArrowUp/Down) to set the meridiem.

append:iconstring | undefined-

Name of the icon to be added at the end of the input.

autocompletestring | undefined"off"

Guides the browser as to the type of information expected in the field.

autofocusBooleanish | undefined-

Sets autofocus on page load.

clearableboolean | undefinedfalse

Displays a clear button when the input has a value and is being interacted with.

compactboolean | undefinedfalse

Sets the component in a compact state.

descriptionstring | undefined-

Descriptive text displayed below the label and above the input. Always visible and linked to the input via aria-describedby (after any errors / warnings, before the hint).

directionInputDirection | undefined-

Direction of the layout of the component. Can either be a predefined value or a pattern separated by a space like xx xxxxx.

disabledboolean | undefinedfalse

Disables the component.

disableWritingboolean | "mobile" | "desktop" | undefinedfalse

Disables typing into the input. Use 'mobile' / 'desktop' to disable typing on one platform only.

errorsstring | string[] | undefined-

Can be a string or an array of string containing the messages to display. They render in an aria-live="polite" region (announced when they appear) and, while the list is non-empty, are referenced FIRST from the segment inputs' aria-describedby, so the reason the field is invalid is re-read whenever a segment regains focus.

hasErrorsboolean | undefinedfalse

Define if the component should be in an error state. It usually attaches a CSS class for styling purposes.

hasWarningsboolean | undefinedfalse

Define if the component should be in a warning state. Same chrome as errors with --bb-warn; errors take priority.

hideLabelboolean | undefinedfalse

Visually hides the label of the input while maintaining accessibility.

hintstring | undefined-

Text box to be displayed near the input, usually to indicate instructions.

idstring | undefined-

The identifier of the component.

labelrequiredstring-

Text content of the label of the element.

labelMode"outside" | "floating" | "inside" | undefined-

Label rendering mode.

labelPosition"left" | "center" | "right" | undefined-

Sets the text alignment of the label.

loadingboolean | undefinedfalse

Sets the component in a loading state, usually triggering some visual styles.

maxstring | undefined-

Maximum selectable time in HH:mm format. Values outside the pattern throw during setup to surface configuration mistakes.

minstring | undefined-

Minimum selectable time in HH:mm format. Values outside the pattern throw during setup to surface configuration mistakes.

modelValuerequiredstring | string[] | null-

v-model value: null for empty, a 24-hour HH:mm (or HH:mm:ss with seconds) string, or a two-element array when range is true.

namestring | undefined-

Defines the name of the input.

offCanvasPropsPartial<BbOffCanvasProps> | undefined-

Props for the phone sheet. A pt inside it, object or colon keys, styles only that sheet. Extra props forwarded to the BbOffCanvas sheet when adaptive is active on mobile (e.g. title, size, persistent). Spread over the defaults: the sheet is draggable (the time wheels never drag it) and hides its ✕ (picking, backdrop, Escape and drag close it); pass { hideClose: false } to bring the ✕ back. A pt inside it styles ONLY the sheet, in BbOffCanvas's part words (root, header, title, description, content, footer, close; state open), object ({ pt: { header: '…' } }) or colon keys ({ 'pt:header': '…' }) alike. It merges after what this component forwards to its sheet, so it wins a conflict and drops nothing — see the passthrough guide § Inside the sheet. For this component it is the only way to style the sheet's header, title and ✕: none of its own parts reach inside the sheet.

persistentHintboolean | undefinedfalse

Keeps the hint displayed.

placeholderstring | undefined-

String displayed when there's no data.

prepend:iconstring | undefined-

Name of the icon to be added at the start of the input.

ptPtMap<BbTimePickerInputPtPart, BbTimePickerInputPtState> | undefined-

Passthrough, object form: the same keys as the pt:* attributes without the prefix. See the pt:<part> row.

pt:activatorPtValue | undefined-
pt:activator:disabledPtValue | undefined-
pt:activator:errorsPtValue | undefined-
pt:activator:has-valuePtValue | undefined-
pt:activator:loadingPtValue | undefined-
pt:activator:openPtValue | undefined-
pt:activator:readonlyPtValue | undefined-
pt:activator:selectedPtValue | undefined-
pt:activator:warningsPtValue | undefined-
pt:boxPtValue | undefined-
pt:box:disabledPtValue | undefined-
pt:box:errorsPtValue | undefined-
pt:box:has-valuePtValue | undefined-
pt:box:loadingPtValue | undefined-
pt:box:openPtValue | undefined-
pt:box:readonlyPtValue | undefined-
pt:box:selectedPtValue | undefined-
pt:box:warningsPtValue | undefined-
pt:clearPtValue | undefined-
pt:clear:disabledPtValue | undefined-
pt:clear:errorsPtValue | undefined-
pt:clear:has-valuePtValue | undefined-
pt:clear:loadingPtValue | undefined-
pt:clear:openPtValue | undefined-
pt:clear:readonlyPtValue | undefined-
pt:clear:selectedPtValue | undefined-
pt:clear:warningsPtValue | undefined-
pt:descriptionPtValue | undefined-
pt:description:disabledPtValue | undefined-
pt:description:errorsPtValue | undefined-
pt:description:has-valuePtValue | undefined-
pt:description:loadingPtValue | undefined-
pt:description:openPtValue | undefined-
pt:description:readonlyPtValue | undefined-
pt:description:selectedPtValue | undefined-
pt:description:warningsPtValue | undefined-
pt:hintPtValue | undefined-
pt:hint:disabledPtValue | undefined-
pt:hint:errorsPtValue | undefined-
pt:hint:has-valuePtValue | undefined-
pt:hint:loadingPtValue | undefined-
pt:hint:openPtValue | undefined-
pt:hint:readonlyPtValue | undefined-
pt:hint:selectedPtValue | undefined-
pt:hint:warningsPtValue | undefined-
pt:iconPtValue | undefined-
pt:icon:disabledPtValue | undefined-
pt:icon:errorsPtValue | undefined-
pt:icon:has-valuePtValue | undefined-
pt:icon:loadingPtValue | undefined-
pt:icon:openPtValue | undefined-
pt:icon:readonlyPtValue | undefined-
pt:icon:selectedPtValue | undefined-
pt:icon:warningsPtValue | undefined-
pt:inputPtValue | undefined-
pt:input:disabledPtValue | undefined-
pt:input:errorsPtValue | undefined-
pt:input:has-valuePtValue | undefined-
pt:input:loadingPtValue | undefined-
pt:input:openPtValue | undefined-
pt:input:readonlyPtValue | undefined-
pt:input:selectedPtValue | undefined-
pt:input:warningsPtValue | undefined-
pt:itemPtValue | undefined-
pt:item:disabledPtValue | undefined-
pt:item:errorsPtValue | undefined-
pt:item:has-valuePtValue | undefined-
pt:item:loadingPtValue | undefined-
pt:item:openPtValue | undefined-
pt:item:readonlyPtValue | undefined-
pt:item:selectedPtValue | undefined-
pt:item:warningsPtValue | undefined-
pt:labelPtValue | undefined-
pt:label:disabledPtValue | undefined-
pt:label:errorsPtValue | undefined-
pt:label:has-valuePtValue | undefined-
pt:label:loadingPtValue | undefined-
pt:label:openPtValue | undefined-
pt:label:readonlyPtValue | undefined-
pt:label:selectedPtValue | undefined-
pt:label:warningsPtValue | undefined-
pt:messagePtValue | undefined-
pt:message:disabledPtValue | undefined-
pt:message:errorsPtValue | undefined-
pt:message:has-valuePtValue | undefined-
pt:message:loadingPtValue | undefined-
pt:message:openPtValue | undefined-
pt:message:readonlyPtValue | undefined-
pt:message:selectedPtValue | undefined-
pt:message:warningsPtValue | undefined-
pt:panelPtValue | undefined-
pt:panel:disabledPtValue | undefined-
pt:panel:errorsPtValue | undefined-
pt:panel:has-valuePtValue | undefined-
pt:panel:loadingPtValue | undefined-
pt:panel:openPtValue | undefined-
pt:panel:readonlyPtValue | undefined-
pt:panel:selectedPtValue | undefined-
pt:panel:warningsPtValue | undefined-
pt:prefixPtValue | undefined-
pt:prefix:disabledPtValue | undefined-
pt:prefix:errorsPtValue | undefined-
pt:prefix:has-valuePtValue | undefined-
pt:prefix:loadingPtValue | undefined-
pt:prefix:openPtValue | undefined-
pt:prefix:readonlyPtValue | undefined-
pt:prefix:selectedPtValue | undefined-
pt:prefix:warningsPtValue | undefined-
pt:rootPtValue | undefined-
pt:root:disabledPtValue | undefined-
pt:root:errorsPtValue | undefined-
pt:root:has-valuePtValue | undefined-
pt:root:loadingPtValue | undefined-
pt:root:openPtValue | undefined-
pt:root:readonlyPtValue | undefined-
pt:root:selectedPtValue | undefined-
pt:root:warningsPtValue | undefined-
pt:sheetPtValue | undefined-
pt:sheet:disabledPtValue | undefined-
pt:sheet:errorsPtValue | undefined-
pt:sheet:has-valuePtValue | undefined-
pt:sheet:loadingPtValue | undefined-
pt:sheet:openPtValue | undefined-
pt:sheet:readonlyPtValue | undefined-
pt:sheet:selectedPtValue | undefined-
pt:sheet:warningsPtValue | undefined-
pt:spinnerPtValue | undefined-
pt:spinner:disabledPtValue | undefined-
pt:spinner:errorsPtValue | undefined-
pt:spinner:has-valuePtValue | undefined-
pt:spinner:loadingPtValue | undefined-
pt:spinner:openPtValue | undefined-
pt:spinner:readonlyPtValue | undefined-
pt:spinner:selectedPtValue | undefined-
pt:spinner:warningsPtValue | undefined-
pt:suffixPtValue | undefined-
pt:suffix:disabledPtValue | undefined-
pt:suffix:errorsPtValue | undefined-
pt:suffix:has-valuePtValue | undefined-
pt:suffix:loadingPtValue | undefined-
pt:suffix:openPtValue | undefined-
pt:suffix:readonlyPtValue | undefined-
pt:suffix:selectedPtValue | undefined-
pt:suffix:warningsPtValue | undefined-
rangeboolean | undefinedfalse

Range selection: v-model expects a two-element array [start, end]. An inverted pair swaps on finalize with an end_before_start error.

readonlyboolean | undefinedfalse

Sets the input in a readonly state.

requiredboolean | undefinedfalse

Sets the input as required.

reverseboolean | undefinedfalse

Reverses the layout: the order of the label and the input is swapped.

secondsboolean | undefinedfalse

Adds the seconds segment. Without it an incoming value carrying seconds displays truncated and zeroes out on the next user commit.

stepnumber | undefined1

Minute granularity for the minute column and its arrow stepping. Constrains what the columns produce, never what typing accepts.

transitionDurationnumber | undefined-

Transition duration, in milliseconds, for the popover appearance.

variantInputVariantType | undefined'outline'

Visual variant of the field box — the same names and tokens as the BbButton variants. Colours only: height, padding and border width are identical across variants, so a form never reflows when one changes. 'ghost' has no border in any state (errors and warnings show through the icon and the messages); every variant keeps the focus ring. Register extra names with the plugin's inputVariants option.

warningsstring | string[] | undefined-

Warning messages to display beneath the field, in their own aria-live region and amber (--bb-text-warn). A string or array; a non-empty list implies the warning state. Errors suppress warnings when both are set. While displayed they are also referenced from the control's aria-describedby, after any errors and before the description/hint.

v-model

Values kept in sync through v-model.

NameTypeDescription
modelValuestring | string[] | null

Events

NameTypeDescription
active(event: "active"): void
error(event: "error", error: TimePickerInputError): void
focus(event: "focus", event: FocusEvent): void
hidden(event: "hidden"): void
hide(event: "hide"): void
inactive(event: "inactive"): void
show(event: "show"): void
shown(event: "shown"): void
update:modelValue(event: "update:modelValue", value: string | string[] | null): void

Slots

The listed properties are the ones exposed to the slot scope.

NameTypeDescription
appendobject

Content rendered after the time fields (before the clock button).

append-outerobject

Content rendered after the entire control, outside the input chrome.

descriptionBbTimePickerInputDescriptionSlotProps

Replaces the description text. Provided alone (no description prop) it still renders the description region and wires it into aria-describedby.

labelBbTimePickerInputLabelSlotProps

Replaces the default label text rendered above the input.

prefixobject

Inline content at the start of the field area.

prependobject

Content rendered before the time fields, at the start of the field box.

prepend-outerobject

Content rendered before the entire control, outside the input chrome.

suffixobject

Inline content at the end of the field area.

Changes from v2

Props removed or renamed in 3.0. If you are coming from v2, the answer is here.

  • hasWarninghasWarningsfails silently