Skip to content

BbTimePicker

Open time columns from your own trigger to assign a wall-clock time or schedule window.

import { BbTimePicker } from 'bitboss-ui';

On this page

Use it for

Use BbTimePicker to set a recurring schedule time from your own cell, chip, or button.

Use something else when

  • BbTimePickerInput: people must type the time or submit it as a labelled form field
  • BbDatePicker: the time belongs to a specific calendar date
  • BbCalendar: the day and the time are picked in the page, from a calendar that stays open

Passthrough

Hover or tap a part to outline it. The toggles turn on loading, errors and warnings where the component has them; only parts get a row.

Set a schedule time

Use one picker per schedule value, such as each warehouse's dispatch time.

Daily dispatch
WarehouseTrucks leave at
Milan North
Berlin Spandau
Lyon Est

The model is null or a zero-padded 24-hour string such as 09:00 (09:00:30 with seconds). It is a wall-clock value: it has no date or timezone and does not shift between regions.

Bind the activator slot's props to your trigger: they carry the click handler, the anchor, the accessible name and the open state. Give the picker a specific label: the trigger is announced as that label followed by its own text (“Dispatch time for Milan North 07:30”).

Display and granularity

Use ampm for a 12-hour display, seconds for HH:mm:ss, and step for the minute rows offered by the columns.

Meeting starts 12-hour, quarter-hour steps
Callback window 09:00–18:00 only
Sensor reading To the second

These props do not change the value contract. ampm still emits 24-hour text, and step constrains picks without rounding an existing off-grid value. min and max take HH:mm and disable the entries outside the window, as the calendar does with days. A pick that still lands outside, such as an hour beside a minute the window rules out, is clamped to the nearest bound and fires error.

Schedule windows

Use range for a shift or service window, with [] as the empty model.

Front desk rota
ShiftHoursLength
Day8 h
Night8 h
Weekend cover—

The pair is kept as picked, so an end before the start is a window that crosses midnight; check the order yourself if yours cannot. The panel toggle chooses which end is being edited; bind v-model:active-segment only when another control must read or change it.

Trigger and mobile surface

Put v-bb-time on a table cell to skip a wrapper per row, or pass a button you already have to the activator prop.

Store hours
DayOpensCloses
Friday
Saturday
Sunday

With a button you already have, drop the slot and pass its ref:

vue
<script setup lang="ts">
import { ref } from 'vue';
import { BbButton, BbTimePicker } from 'bitboss-ui';

const time = ref<string | null>(null);
const trigger = ref();
</script>

<template>
    <BbButton ref="trigger" variant="outline">Pick a time</BbButton>
    <BbTimePicker v-model="time" :activator="trigger" />
</template>

The columns support arrow keys and digit type-ahead, so add no key handlers of your own. On phones, adaptive opens them in a bottom sheet, titled here through offCanvasProps; set :adaptive="false" for viewport-independent tests. Desktop placement props do not apply to the sheet.