Skip to content

DatePicker 日期选择器

Form · Interactive component

Date value selection.

On-demand importwbbb-ui/components/date-picker

Basic Usage

Example code
<script setup lang="ts">
import { ref } from 'vue'
import { WbbbDatePicker } from 'wbbb-ui/components/date-picker'
import 'wbbb-ui/styles/date-picker'

const value = ref('')
</script>

<template>
  <WbbbDatePicker v-model="value" locale="en-US" />
</template>
Live mobile previewOpen in a new tab ↗

States and Interaction

All listed states can be operated and verified in the live Playground preview.

DefaultFilledFocusDisabledError

API Reference

Props

PropertyDescriptionTypeDefaultRequired
disabledPrevents user interaction with the component.booleanfalseNo
endSets the latest selectable or valid value.string''No
fieldsRegisters the form fields managed by the component.'day' \| 'month' \| 'year''day'No
localeOverrides the locale used for built-in display copy.WbbbLocaleInputNo
modelValueProvides the current value used by v-model.string''No
placeholderSets placeholder text when no value is present.string由 locale 决定No
startSets the earliest selectable or valid value.string''No

Events

  • update:modelValue
  • change

Slots

None

Two-way binding

Supports v-model (modelValue).

Platform Notes

Build verification: H5, App Vue, WeChat Mini Program, Alipay Mini Program, and Douyin Mini Program.

Runtime differences: H5 supports keyboard focus and reduced motion. Mini Programs provide equivalent touch interaction; verify upload, date selection, and overlays on target platforms.

Usage note: Use start and end to constrain selectable dates. Pass normalized date strings from the business layer for cross-timezone workflows.

Wbbb UI · Built for uni-app product experiences