Props
| Name | Description |
|---|---|
adaptive Type: booleanDefaultconfig.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: booleanDefaultfalse | Displays a clear button when the input has a value and is being interacted with. |
compact Type: booleanDefaultfalse | 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 |
disableCalendar Type: boolean | "mobile" | "desktop"Defaultfalse | Disables the calendar: hides the trigger button and prevents the popover from opening. Use Replaces v2 |
disabled Type: booleanDefaultfalse | Disables the component. |
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: booleanDefaultfalse | 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. |
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: "left" | "center" | "right" | Sets the 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 |
offCanvasProps Type: Partial<BbOffCanvasProps> | Props for the phone sheet (the v2 spelled it |
persistentHint Type: booleanDefaultfalse | Keeps the hint displayed. |
placeholder Type: string | Text shown while the field is empty. |
prepend:icon Type: string | Name of the icon to be added at the start of the input. |
pt Type: (PtMap<BbDatePickerInputPtPart, BbDatePickerInputPtState> & { "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; "clear:ghost"?: PtValue | undefined; "label:outline"?: PtValue | undefined; "label:secondary"?: PtValue | undefined; "label:ghost"?: PtValue | undefined; "description:outline"?: PtValue | undefined; "description:secondary"?: PtValue | undefined; "description:ghost"?: PtValue | undefined; "message:outline"?: PtValue | undefined; "message:secondary"?: PtValue | undefined; "message:ghost"?: PtValue | undefined; "hint:outline"?: PtValue | undefined; "hint:secondary"?: PtValue | undefined; "hint:ghost"?: PtValue | undefined; "input:outline"?: PtValue | undefined; "input:secondary"?: PtValue | undefined; "input:ghost"?: PtValue | undefined; "box:outline"?: PtValue | undefined; "box:secondary"?: PtValue | undefined; "box:ghost"?: PtValue | undefined; "prefix:outline"?: PtValue | undefined; "prefix:secondary"?: PtValue | undefined; "prefix: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: booleanDefaultfalse | 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 |
time Type: string | string[] | null |
|
transitionDuration Type: number | Transition duration, in milliseconds, for the popover appearance. |
type Type: DatePickerTypeDefault"date" | What the field edits, and 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: InputVariantTypeDefault'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 | |
time Type: string | string[] | null | With |
Events
| Name | Description |
|---|---|
active Type: (): 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: (): void | Emitted when focus/click moves outside the entire composite control. |
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:time Type: (value: string | string[] | null): void | Companion time model ( |
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 |
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 silentlyhasWarninghasWarningsfails silentlyhidePopoverdisableCalendarfails 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