mirror of
https://github.com/tenrok/vue2-datepicker.git
synced 2026-06-01 08:54:06 +03:00
42e7853018abd1d01f9527c3fcabb83e028af80f
vue2-datepicker
A Datepicker Component For Vue2
Demo
https://mengxiong10.github.io/vue2-datepicker/
Install
$ npm install vue2-datepicker --save
Usage
<script>
import DatePicker from 'vue2-datepicker'
export default {
components: { DatePicker },
data() {
return {
time1: '',
time2: '',
}
}
}
</script>
<template>
<div>
<date-picker v-model="time1"></date-picker>
<date-picker v-model="time2" range></date-picker>
</div>
</template>
Attributes
| Prop | Type | Default | Description |
|---|---|---|---|
| range | Boolean | false | if true, the type is daterange |
| format | String | yyyy-MM-dd | Date formatting string |
| lang | String | zh | Translation (en/zh/es) |
| placeholder | String | input placeholder text | |
| width | String/Number | 210 | input size |
| disabledDays | Array | [] | Days in YYYY-MM-DD format to disable |
| showYearNav | Boolean | true | Show the year nav in the calendar |
Languages
JavaScript
63%
Vue
29.2%
SCSS
6.1%
Shell
0.9%
HTML
0.8%