Skip to content

BbTimePicker

Opens hour/minute(/second) columns in a popover on a trigger you own — the time analog of BbDatePicker; also the v-bb-time directive.

import { BbTimePicker } from 'bitboss-ui';

On this page

Props

NameTypeDefaultDescription
activatorElementOrComponentRef | undefined-

External activator element or component ref. When provided, the activator slot is not rendered and click + ARIA are attached programmatically to the referenced element — mirroring BbDatePicker.

activeSegmentBbTimePickerSegment | undefined-

Which end the columns edit in range mode (v-model:active-segment). Standalone use manages this internally via the in-panel toggle; a host can drive it. Ignored outside range.

adaptiveboolean | undefined`config.adaptive` (`true`)

On mobile, open in 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 column; emitted values stay 24-hour.

anchorElementOrComponentRef | undefined-

Element or component ref the popover positions itself relative to. Defaults to the activator when omitted (anchor to a larger row while a smaller element stays the click target).

boundaryElementOrComponentRefOrSelector | undefined-

Constrains the popover within a bounding element or CSS selector.

disabledboolean | undefinedfalse

Disables the activator and the columns.

disableFlipboolean | undefinedfalse

Disable the automatic flip to the opposite side on overflow.

eagerboolean | undefinedfalse

Render popover content before it is first shown.

labelstring | undefined-

Accessible label applied to the activator via aria-label.

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 [start, end] array when range is true.

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.

offsetnumber | undefined4

Space the popover keeps from the activator.

paddingnumber | undefined-

Minimum empty space to keep from the edge of the page.

placementPlacement | undefined-

Position of the popover relative to the activator/anchor.

ptPtMap<BbTimePickerPtPart, BbTimePickerPtState> | undefined-

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

pt:itemPtValue | undefined-
pt:item:openPtValue | undefined-
pt:item:selectedPtValue | undefined-
pt:panelPtValue | undefined-
pt:panel:openPtValue | undefined-
pt:panel:selectedPtValue | undefined-
pt:rootPtValue | undefined-
pt:root:openPtValue | undefined-
pt:root:selectedPtValue | undefined-
pt:sheetPtValue | undefined-
pt:sheet:openPtValue | undefined-
pt:sheet:selectedPtValue | undefined-
rangeboolean | undefinedfalse

Range selection: the value is a two-element [start, end] array.

readonlyboolean | undefinedfalse

Prevents opening while keeping the activator visible.

secondsboolean | undefinedfalse

Adds the seconds column.

stepnumber | undefined1

Minute-column granularity and arrow stepping.

transitionDurationnumber | undefined250

Popover/sheet transition duration in milliseconds.

v-model

Values kept in sync through v-model.

NameTypeDescription
activeSegmentBbTimePickerSegment | undefined
modelValuestring | string[] | null

Events

NameTypeDescription
error(event: "error", error: TimePickerInputError): void
hidden(event: "hidden"): void
hide(event: "hide"): void
show(event: "show"): void
shown(event: "shown"): void
time-pick(event: "time-pick", payload: { unit: TimeUnit; value: string; }): void
update:activeSegment(event: "update:activeSegment", value: BbTimePickerSegment): void
update:modelValue(event: "update:modelValue", value: string | string[] | null): void

Slots

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

NameTypeDescription
activatorBbTimePickerActivatorSlotProps

Custom activator element. Apply v-bind="props" to your trigger.