Props
| Name | Description |
|---|---|
adaptive Type: booleanDefaultall.adaptive (true) | On mobile the calendar opens inside a bottom off-canvas sheet instead of a floating popover, mirroring the adaptive behaviour of On by default in v3. Set |
ampm Type: booleanDefaultfalse | 12-hour display with an AM/PM segment (requires |
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: booleanDefaultall.clearable (false) | Displays a clear button when the input has a value and is being interacted with, and lets re-picking the selected date clear it. Also decides what picking the selected date again does: without it the date stays, with it the pick clears it. |
compact Type: boolean | Compact density: the field uses the |
description Type: string | Text between the label and the input. Unlike the hint it is always visible; it joins the input's |
disabled Type: booleanDefaultfalse | Disables the component. |
disablePanel Type: boolean | "mobile" | "desktop"Defaultfalse | Disables the calendar panel: hides its trigger, and the panel (popover or phone sheet) never opens, so the field is typing only. Use Replaces v2 |
disableWriting Type: boolean | "mobile" | "desktop"Defaultfalse | Disables typing into the input. Use Replaces v2 |
errors Type: string | string[] | Error messages under the field, a string or array, in an |
firstDayOfWeek Type: 0 | 1 | 2 | 3 | 4 | 5 | 6Defaultthe locale's week start | First day of the week (0 = Sunday … 6 = Saturday). Omitted, the active locale's week start: Monday for |
floating Type: boolean | If true the date will have a format YYYY-MM-DD instead of the default ISO string. Use it when “2027-01-01” must stay that day everywhere. Leave it off for an instant; seed a |
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. Pair it with a |
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. See example |
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: "end" | "start" | "center" | "left" | "right"Default'start' | 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 date in With |
min Type: string | Minimum selectable date in With |
modelValue Type: string | string[] | null | Used by v-model. Can be null, a single string, or an array of strings based on whether a range or single date is needed. |
name Type: string | Defines the name of the input. The key the value is submitted under: in a native form post or |
numberOfMonths Type: numberDefault1 | How many months the calendar popover shows side by side (day grids only); the phone sheet always shows one. Too narrow for them all, the months wrap. The phone sheet always shows one month. See example |
offCanvasProps Type: Partial<BbOffCanvasProps> | Props for the phone sheet (the v2 spelled it |
open Type: booleanDefaultfalse | Whether the panel is open ( |
persistentHint Type: booleanDefaultfalse | Keeps the hint displayed. |
placeholder Type: string | Text shown while the field is empty. Unset, the field shows the locale's format (such as |
prefix Type: string | Text in the box before the value ( |
prepend:icon Type: string | Name of the icon to be added at the start of the input. |
pt Type: (PtCompoundOf<"", { readonly parts: readonly ["root", "label", "description", "message", "hint", "box", "input", "icon", "spinner", "prefix", "suffix", "clear", "activator", "panel", "sheet", "header", "arrow", "month", "year", "cellColumnHeader", "week", "weekNumber", "day", "dayButton", "monthItem", "yearItem", "item"]; readonly states: readonly ["hasValue", "outside", "today", "inRange", "selected", "rangeStart", "rangeEnd", "readonly", "disabled", "warnings", "errors", "active", "open", "highlighted", "loading"]; readonly wide: readonly ["hasValue", "readonly", "disabled", "warnings", "errors", "open", "loading"]; readonly node: { readonly week: readonly ["inRange", "selected", "rangeStart", "rangeEnd"]; readonly weekNumber: readonly ["inRange", "selected", "rangeStart", "rangeEnd"]; readonly day: readonly ["outside", "today", "inRange", "selected", "rangeStart", "rangeEnd", "highlighted"]; readonly dayButton: readonly ["outside", "today", "inRange", "selected", "rangeStart", "rangeEnd", "highlighted"]; readonly monthItem: readonly ["inRange", "selected", "rangeStart", "rangeEnd", "highlighted"]; readonly yearItem: readonly ["inRange", "selected", "rangeStart", "rangeEnd", "highlighted"]; readonly month: readonly ["active"]; readonly year: readonly ["active"]; readonly item: readonly ["selected"]; }; readonly except: { readonly clear: readonly ["disabled", "readonly"]; }; readonly variant: { readonly names: readonly ["outline", "secondary", "ghost"]; readonly option: "datePickerInputVariants"; readonly parts: readonly ["root", "label", "description", "message", "hint", "box", "input", "icon", "spinner", "prefix", "suffix", "clear", "activator"]; }; }> & { header?: PtValue | undefined; input?: PtValue | undefined; label?: PtValue | undefined; prefix?: PtValue | undefined; root?: PtValue | undefined; icon?: PtValue | undefined; panel?: PtValue | undefined; "header:disabled"?: PtValue | undefined; "header:open"?: PtValue | undefined; "root:disabled"?: PtValue | undefined; "root:open"?: PtValue | undefined; "icon:disabled"?: PtValue | undefined; "icon:open"?: PtValue | undefined; "panel:disabled"?: PtValue | undefined; "panel:open"?: PtValue | undefined; spinner?: PtValue | undefined; clear?: PtValue | undefined; "root:loading"?: PtValue | undefined; "icon:loading"?: PtValue | undefined; "spinner:loading"?: PtValue | undefined; "clear:loading"?: PtValue | undefined; "root:errors"?: PtValue | undefined; "root:warnings"?: PtValue | undefined; "root:readonly"?: PtValue | undefined; item?: PtValue | undefined; "item:disabled"?: PtValue | undefined; "spinner:disabled"?: PtValue | undefined; arrow?: PtValue | undefined; month?: PtValue | undefined; year?: PtValue | undefined; cellColumnHeader?: PtValue | undefined; week?: PtValue | undefined; weekNumber?: PtValue | undefined; day?: PtValue | undefined; dayButton?: PtValue | undefined; monthItem?: PtValue | undefined; yearItem?: PtValue | undefined; "arrow:disabled"?: PtValue | undefined; "month:disabled"?: PtValue | undefined; "year:disabled"?: PtValue | undefined; "cellColumnHeader:disabled"?: PtValue | undefined; "week:disabled"?: PtValue | undefined; "weekNumber:disabled"?: PtValue | undefined; "day:disabled"?: PtValue | undefined; "dayButton:disabled"?: PtValue | undefined; "monthItem:disabled"?: PtValue | undefined; "yearItem:disabled"?: PtValue | undefined; "item:selected"?: PtValue | undefined; "month:active"?: PtValue | undefined; "year:active"?: PtValue | undefined; "week:inRange"?: PtValue | undefined; "week:selected"?: PtValue | undefined; "week:rangeStart"?: PtValue | undefined; "week:rangeEnd"?: PtValue | undefined; "weekNumber:inRange"?: PtValue | undefined; "weekNumber:selected"?: PtValue | undefined; "weekNumber:rangeStart"?: PtValue | undefined; "weekNumber:rangeEnd"?: PtValue | undefined; "day:outside"?: PtValue | undefined; "day:today"?: PtValue | undefined; "day:inRange"?: PtValue | undefined; "day:selected"?: PtValue | undefined; "day:rangeStart"?: PtValue | undefined; "day:rangeEnd"?: PtValue | undefined; "day:highlighted"?: PtValue | undefined; "dayButton:outside"?: PtValue | undefined; "dayButton:today"?: PtValue | undefined; "dayButton:inRange"?: PtValue | undefined; "dayButton:selected"?: PtValue | undefined; "dayButton:rangeStart"?: PtValue | undefined; "dayButton:rangeEnd"?: PtValue | undefined; "dayButton:highlighted"?: PtValue | undefined; "monthItem:inRange"?: PtValue | undefined; "monthItem:selected"?: PtValue | undefined; "monthItem:rangeStart"?: PtValue | undefined; "monthItem:rangeEnd"?: PtValue | undefined; "monthItem:highlighted"?: PtValue | undefined; "yearItem:inRange"?: PtValue | undefined; "yearItem:selected"?: PtValue | undefined; "yearItem:rangeStart"?: PtValue | undefined; "yearItem:rangeEnd"?: PtValue | undefined; "yearItem:highlighted"?: PtValue | undefined; description?: PtValue | undefined; message?: PtValue | undefined; hint?: PtValue | undefined; "label:disabled"?: PtValue | undefined; "label:errors"?: PtValue | undefined; "label:warnings"?: PtValue | undefined; "label:readonly"?: PtValue | undefined; "icon:errors"?: PtValue | undefined; "icon:warnings"?: PtValue | undefined; "icon:readonly"?: PtValue | undefined; "description:disabled"?: PtValue | undefined; "description:errors"?: PtValue | undefined; "description:warnings"?: PtValue | undefined; "description:readonly"?: PtValue | undefined; "message:disabled"?: PtValue | undefined; "message:errors"?: PtValue | undefined; "message:warnings"?: PtValue | undefined; "message:readonly"?: PtValue | undefined; "hint:disabled"?: PtValue | undefined; "hint:errors"?: PtValue | undefined; "hint:warnings"?: PtValue | undefined; "hint:readonly"?: PtValue | undefined; "label:loading"?: PtValue | undefined; "label:hasValue"?: PtValue | undefined; "root:hasValue"?: PtValue | undefined; "icon:hasValue"?: PtValue | undefined; "item:loading"?: PtValue | undefined; "item:errors"?: PtValue | undefined; "item:warnings"?: PtValue | undefined; "item:readonly"?: PtValue | undefined; "item:hasValue"?: PtValue | undefined; "description:loading"?: PtValue | undefined; "description:hasValue"?: PtValue | undefined; "message:loading"?: PtValue | undefined; "message:hasValue"?: PtValue | undefined; "hint:loading"?: PtValue | undefined; "hint:hasValue"?: PtValue | undefined; sheet?: PtValue | undefined; "sheet:open"?: PtValue | undefined; activator?: PtValue | undefined; "description:open"?: PtValue | undefined; box?: PtValue | undefined; suffix?: PtValue | undefined; "input:disabled"?: PtValue | undefined; "input:open"?: PtValue | undefined; "input:loading"?: PtValue | undefined; "input:errors"?: PtValue | undefined; "input:warnings"?: PtValue | undefined; "input:readonly"?: PtValue | undefined; "input:hasValue"?: PtValue | undefined; "label:open"?: PtValue | undefined; "prefix:disabled"?: PtValue | undefined; "prefix:open"?: PtValue | undefined; "prefix:loading"?: PtValue | undefined; "prefix:errors"?: PtValue | undefined; "prefix:warnings"?: PtValue | undefined; "prefix:readonly"?: PtValue | undefined; "prefix:hasValue"?: PtValue | undefined; "panel:loading"?: PtValue | undefined; "panel:errors"?: PtValue | undefined; "panel:warnings"?: PtValue | undefined; "panel:readonly"?: PtValue | undefined; "panel:hasValue"?: PtValue | undefined; "spinner:open"?: PtValue | undefined; "spinner:errors"?: PtValue | undefined; "spinner:warnings"?: PtValue | undefined; "spinner:readonly"?: PtValue | undefined; "spinner:hasValue"?: PtValue | undefined; "clear:open"?: PtValue | undefined; "clear:errors"?: PtValue | undefined; "clear:warnings"?: PtValue | undefined; "clear:hasValue"?: PtValue | undefined; "message:open"?: PtValue | undefined; "hint:open"?: PtValue | undefined; "sheet:disabled"?: PtValue | undefined; "sheet:loading"?: PtValue | undefined; "sheet:errors"?: PtValue | undefined; "sheet:warnings"?: PtValue | undefined; "sheet:readonly"?: PtValue | undefined; "sheet:hasValue"?: PtValue | undefined; "box:disabled"?: PtValue | undefined; "box:open"?: PtValue | undefined; "box:loading"?: PtValue | undefined; "box:errors"?: PtValue | undefined; "box:warnings"?: PtValue | undefined; "box:readonly"?: PtValue | undefined; "box:hasValue"?: PtValue | undefined; "suffix:disabled"?: PtValue | undefined; "suffix:open"?: PtValue | undefined; "suffix:loading"?: PtValue | undefined; "suffix:errors"?: PtValue | undefined; "suffix:warnings"?: PtValue | undefined; "suffix:readonly"?: PtValue | undefined; "suffix:hasValue"?: PtValue | undefined; "item:open"?: PtValue | undefined; "arrow:open"?: PtValue | undefined; "month:open"?: PtValue | undefined; "year:open"?: PtValue | undefined; "cellColumnHeader:open"?: PtValue | undefined; "week:open"?: PtValue | undefined; "weekNumber:open"?: PtValue | undefined; "day:open"?: PtValue | undefined; "dayButton:open"?: PtValue | undefined; "monthItem:open"?: PtValue | undefined; "yearItem:open"?: PtValue | undefined; "header:loading"?: PtValue | undefined; "header:errors"?: PtValue | undefined; "header:warnings"?: PtValue | undefined; "header:readonly"?: PtValue | undefined; "header:hasValue"?: PtValue | undefined; "arrow:loading"?: PtValue | undefined; "arrow:errors"?: PtValue | undefined; "arrow:warnings"?: PtValue | undefined; "arrow:readonly"?: PtValue | undefined; "arrow:hasValue"?: PtValue | undefined; "month:loading"?: PtValue | undefined; "month:errors"?: PtValue | undefined; "month:warnings"?: PtValue | undefined; "month:readonly"?: PtValue | undefined; "month:hasValue"?: PtValue | undefined; "year:loading"?: PtValue | undefined; "year:errors"?: PtValue | undefined; "year:warnings"?: PtValue | undefined; "year:readonly"?: PtValue | undefined; "year:hasValue"?: PtValue | undefined; "cellColumnHeader:loading"?: PtValue | undefined; "cellColumnHeader:errors"?: PtValue | undefined; "cellColumnHeader:warnings"?: PtValue | undefined; "cellColumnHeader:readonly"?: PtValue | undefined; "cellColumnHeader:hasValue"?: PtValue | undefined; "week:loading"?: PtValue | undefined; "week:errors"?: PtValue | undefined; "week:warnings"?: PtValue | undefined; "week:readonly"?: PtValue | undefined; "week:hasValue"?: PtValue | undefined; "weekNumber:loading"?: PtValue | undefined; "weekNumber:errors"?: PtValue | undefined; "weekNumber:warnings"?: PtValue | undefined; "weekNumber:readonly"?: PtValue | undefined; "weekNumber:hasValue"?: PtValue | undefined; "day:loading"?: PtValue | undefined; "day:errors"?: PtValue | undefined; "day:warnings"?: PtValue | undefined; "day:readonly"?: PtValue | undefined; "day:hasValue"?: PtValue | undefined; "dayButton:loading"?: PtValue | undefined; "dayButton:errors"?: PtValue | undefined; "dayButton:warnings"?: PtValue | undefined; "dayButton:readonly"?: PtValue | undefined; "dayButton:hasValue"?: PtValue | undefined; "monthItem:loading"?: PtValue | undefined; "monthItem:errors"?: PtValue | undefined; "monthItem:warnings"?: PtValue | undefined; "monthItem:readonly"?: PtValue | undefined; "monthItem:hasValue"?: PtValue | undefined; "yearItem:loading"?: PtValue | undefined; "yearItem:errors"?: PtValue | undefined; "yearItem:warnings"?: PtValue | undefined; "yearItem:readonly"?: PtValue | undefined; "yearItem:hasValue"?: PtValue | undefined; "activator:disabled"?: PtValue | undefined; "activator:open"?: PtValue | undefined; "activator:loading"?: PtValue | undefined; "activator:errors"?: PtValue | undefined; "activator:warnings"?: PtValue | undefined; "activator:readonly"?: PtValue | undefined; "activator:hasValue"?: PtValue | undefined; } & { "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; "label:outline"?: PtValue | undefined; "description:outline"?: PtValue | undefined; "message:outline"?: PtValue | undefined; "hint:outline"?: PtValue | undefined; "input:outline"?: PtValue | undefined; "input:secondary"?: PtValue | undefined; "input:ghost"?: PtValue | undefined; "label:secondary"?: PtValue | undefined; "label:ghost"?: PtValue | undefined; "prefix:outline"?: PtValue | undefined; "prefix:secondary"?: PtValue | undefined; "prefix:ghost"?: PtValue | undefined; "clear:ghost"?: PtValue | undefined; "description:secondary"?: PtValue | undefined; "description:ghost"?: PtValue | undefined; "message:secondary"?: PtValue | undefined; "message:ghost"?: PtValue | undefined; "hint:secondary"?: PtValue | undefined; "hint:ghost"?: PtValue | undefined; "box:outline"?: PtValue | undefined; "box:secondary"?: PtValue | undefined; "box: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 | Selects a range of dates between two dates. It selects all of the days between start and end. 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: boolean | Reverses the layout. Applicable in every direction 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 (requires |
selectable Type: ((date: string) => boolean) | Function that accepts a |
step Type: numberDefault1 | Minute granularity for the calendar's minute column and arrow stepping (requires |
suffix Type: string | Text in the box after the value ( |
time Type: string | string[] | null |
|
today Type: string | Today's date, an ISO day like the values ( Also where ArrowUp / ArrowDown start in an empty day, month or year segment. Marked on the server too; an app-wide default goes in |
transitionDuration Type: number | Transition duration, in milliseconds, for the popover appearance. |
type Type: DatePickerTypeDefault"date" | What the field edits, so its segments and emitted shape: |
utc Type: booleanDefaultfalse | Emits UTC ISO strings ( Only when the receiving API requires a |
validationLabel Type: string | The field's name in validation messages ( |
validationMode Type: ValidationMode | When the field validates: |
variant Type: InputVariantOf<DatePickerInputVariantRegistry>Default'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 | |
open Type: boolean | Bound, your ref opens and closes the calendar and receives every close the user makes. A static |
time Type: string | string[] | null | With |
Events
| Name | Description |
|---|---|
active Type: (value: BbDateValue<R, false> | null): void | Emitted when the composite control receives focus (first focusin after being inactive). |
error Type: (error: DatePickerInputError): void | Emitted alongside every value normalization or removal when the typed date is invalid or out of range. See Turn the payload into a message through |
focus Type: (event: FocusEvent): void | Emitted when a native text field inside the control gains focus. Forwards the original DOM |
hide Type: (): void | Emitted as soon as the calendar surface starts to close. |
inactive Type: (value: BbDateValue<R, false> | null): void | Emitted when focus/click moves outside the entire composite control, with the current value, whether or not it changed. |
show Type: (): void | Emitted as soon as the calendar surface starts to open (the popover, or the sheet on a phone). |
shown Type: (): void | Emitted once the calendar surface is open and its open transition has finished. |
update:modelValue Type: (value: string | string[] | null): void | Emitted whenever the selected date value changes. Payload is |
update:open Type: (value: boolean): void | The panel opened or closed ( |
update:time Type: (value: string | string[] | null): void | Companion time model ( |
value-commit Type: (value: BbDateValue<R, false>): void | Emitted once the user finishes changing the value, after the last The hook for saving: a pick, a step, clear, or typing once the user leaves the field (including a value the field corrects then); a range once both ends are set. Never for a value your code sets. See example |
Slots
The listed properties are the ones exposed to the slot scope.
| Name | Description |
|---|---|
<YYYY-MM-DD> Type: BbCalendarDaySlotProps | One date's button label (e.g. |
<YYYY-MM-DD>:append Type: BbCalendarDaySlotProps | Content under one date's cell; beats |
append Type: object | Content rendered after the date fields, at the end of the field box (before the calendar toggle button). |
append:outer Type: object | Content rendered after the entire date picker control, outside the input chrome. |
day Type: { first: boolean; item: string; label: string; last: boolean; middle: boolean; outside: boolean; selected: boolean; } | Replaces the day button label inside each calendar day. |
day:append Type: { first: boolean; item: string; label: string; last: boolean; middle: boolean; outside: boolean; selected: boolean; } | Appends content below each calendar day. |
description Type: BbDatePickerInputDescriptionSlotProps | Replaces the description text. Provided alone (no |
hint Type: BbDatePickerInputDescriptionSlotProps | Replaces the hint text; alone it still renders the row. May hold an action. |
label Type: BbDatePickerInputLabelSlotProps | Replaces the default label text rendered above the date picker. |
prefix Type: object | Inline content rendered at the start of the input field area, before the date fields. |
prepend Type: object | Content rendered before the date fields, at the start of the field box. |
prepend:outer Type: object | Content rendered before the entire date picker control, outside the input chrome. |
suffix Type: object | Inline content rendered at the end of the input field area, after the date fields. |
Renamed and removed
Names from v2 and from earlier 3.0 betas that no longer work, and what to write instead.
allowWritingdisableWritingfails silently- slot
append-outerappend:outerfails silently - slot
append:<x><x>:appendfails silently - slot
append:dayday:appendfails silently datetimetypefails silentlydirectionlayoutfails silentlydisableCalendardisablePanelfails silentlyhasWarninghasWarningsfails silentlyhidePopoverdisablePanelfails silently- slot
prepend-outerprepend:outerfails silently pt:columnHeaderpt:cellColumnHeaderfails silentlyvalidateOnvalidationModefails 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.widthremovedfails silently