@composy/datepicker-vue

LDesign DatePicker Vue Component
Install
npm install @composy/datepicker-vue
Latest Version:0.0.2
Vue:3
License:MIT
Last Updated:Oct 12, 2026
Links: npm
Maintainer: swimly

@composy/datepicker-vue

Vue 3 adapter for @composy/datepicker-core.

Components

  • DatePicker
  • DateRangePicker
  • TimePicker
  • v-datepicker directive
  • useDatePicker and useClickOutside composables
  • DatePickerPlugin and createDatePickerEnginePlugin

Usage

<script setup lang="ts">
import { ref } from 'vue'
import { DatePicker, type DateRange } from '@composy/datepicker-vue'
import '@composy/datepicker-core/index.css'

const value = ref<DateRange | null>(null)
</script>

<template>
  <DatePicker
    v-model="value"
    mode="datetime"
    selection-type="range"
    allow-input
    input-separator="至"
    @change="(nextValue, formatted) => console.log(nextValue, formatted)"
  />
</template>

Main props

DatePicker forwards the core options, including mode, selectionType, format, valueFormat, weekStart, disabledDate, disabledTime, minDate, maxDate, showWeekNumber, showToday, showConfirm, showTime, timeFormat, hourStep, minuteStep, secondStep, use12Hours, hideSeconds, allowClear, allowInput, inputValidator, inputSeparator, presets, dateMark, size, placement, locale, classPrefix, placeholder, disabled, readonly, and panelCount.

DateRangePicker fixes selectionType to range. TimePicker fixes mode to time and accepts a Date or null as its model value.

Events include update:modelValue, change, panelChange, open, close, confirm, clear, focus, and blur.

Vue components mount the core renderer against their own container document. This also keeps outside-click handling in the same document when the component is rendered inside an iframe.

Styles

The Vue package does not ship a separate stylesheet. Import the CSS from the core package:

import '@composy/datepicker-core/index.css'

Build output is generated to dist, es, esm, and lib. The package exports components, directives, hooks, plugins, and TypeScript declarations.

Development

Canonical ESLint and ESM/CJS TypeScript configurations are in .ldesign/; package-root config files forward to them for compatibility.

pnpm --dir packages/vue run type-check
pnpm --dir packages/vue run type-check:cjs
pnpm --dir packages/vue run lint:check
pnpm --filter @composy/datepicker-vue build

License

MIT

Related Packages

vue-material-date-time-picker

A simple Vue.js date and time picker made with material design in mind

1,586 7
@custom_okoshko/vue

Vue 3 wrapper for @custom_okoshko/core calendar.

163
vuedt

crazy lightweight Vuejs Date and Time picker component with eyecandy

3,768 8
tedir-calendar

Tedir Calendar is a Vue 3 & Web Component Event Calendar

647 2
vue2-datepicker

A Datepicker Component For Vue2

3,941,157 1,514

Version History

Version Released Vue License
0.0.2 3.5.32 MIT
0.0.1 ^3.5.32 MIT