Skip to content

BbDatePickerInput

Enter a calendar day, range, month, year, or dated time in a labelled segmented field.

import { BbDatePickerInput } from 'bitboss-ui';

On this page

Use it for

Use BbDatePickerInput when people type or pick a date in a labelled form field.

Use something else when

  • BbDatePicker: the calendar opens from your own cell, chip, or button
  • BbCalendar: the calendar sits in the page, always visible, with no field around it
  • BbTimePickerInput: the value is a recurring wall-clock time with no date
  • BbSelect: the choice is a short fixed list of periods

Also see: Validated forms.

Choose the value contract before adding validation or layout.

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.

Guidance while the control is focused.

Calendar day or instant

Use floating when “2027-01-01” must stay that day everywhere. Use the default offset timestamp for an instant, and utc only when the receiving API requires Z.

Same day, three contracts.

null
null
null

The default emits a local-offset ISO timestamp. utc emits the same instant in UTC. floating emits only YYYY-MM-DD; it cannot be combined meaningfully with utc.

Coming from v2The default timezone output changed

v2 emitted UTC Z timestamps. v3 emits the local offset by default. Add utc to preserve the v2 wire format, or choose floating for a calendar day. Reading accepts all three forms, so stored values do not need rewriting.

For server-rendered pages, seed a floating value or start empty. A zoned instant may display different local digits on the server and in the browser.

A date field

Use a stable id, a visible label, and name when native form submission or FormData must include the value.

Models: {"issuedAt":"2026-08-30","dueAt":"2026-09-29"}

Bind min to another field, as the due date does here, and use readonly for dates the system sets.

Inside a BbForm the field joins the form by its name and checks itself with rules; formless keeps a filter date out of the submitted values. To require it, add rules="required", and the asterisk follows. Inside a form the required prop is a hint that marks the field and checks nothing; outside one it is the native attribute.

Label, message and state props work as on BbTextInput. variant="none" drops every colour, focus ring included, for a field you style yourself, like the flat search field on BbTextInput.

Date ranges

Set range for a check-in/check-out window and keep the model as an array.

4 nights: ["2026-09-07","2026-09-11"]

Seed and clear it with []. A reversed typed range is swapped on commit and emits end_before_start.

Bounds and invalid input

Use min and max for a continuous window and selectable for rules such as weekdays or closures.

Bookable Aug 30 to Oct 31. Closed Sep 7, Sep 21, Oct 12.

Type 09/07/2026 and leave the field: the closure is cleared and the field says why.

Malformed bounds throw during setup. A typed disabled date is normalized on commit and reported through error; turn that payload into an application message with errors. Clear the message on active, not on the model update that normalization itself caused.

Other calendar values

Set type="month" or type="year" for calendar labels. They emit YYYY-MM or YYYY, force floating, and ignore timezone props.

Models: {"expiry":"2028-03","founded":"2014"}

Use type="datetime" only when a time belongs to a specific date.

v-model → 2026-08-31 · v-model:time → 09:30

12-hour fields, quarter-hour column — and still 14:30 in the model.

With floating, bind v-model:time, or the picked time is lost. The companion model is always a 24-hour HH:mm or HH:mm:ss string. A bound with a time, such as min="2026-08-30T14:00", disables the earlier times on that day.

Typing and mobile

Use disable-calendar where typing is faster than paging through months, as for a birth date, and disable-writing="mobile" where touch users should pick from the calendar.

Segments follow the plugin's locale: month first for en, day first otherwise.

On phones, adaptive opens the calendar in a bottom sheet. Pass sheet options through offCanvasProps, or set :adaptive="false" for viewport-independent tests.

Coming from v2Renamed and removed date-field props
  • Replace datetime with type="datetime".
  • Replace allow-writing with the inverted disable-writing.
  • Replace hide-popover with disable-calendar.
  • Remove width; constrain the calendar with CSS only when needed.
  • Replace has-warning with has-warnings.

The v2 token not-mobile becomes mobile for the inverted writing prop and desktop for disable-calendar.

The adaptive mobile sheet is now enabled by default. Set :adaptive="false" to retain a popover on every viewport.