详解vue移动端日期选择组件
2018-10-12 14:05
2396 查看
先给大家分享一下源码:https://github.com/lx544690189/vue-mobile-calendar
Build Setup
# install dependencies npm install # build for production with minification npm run build
Usage
install
npm install vue-mobile-calendar
or:(from the dist folder)
<script src="vue-mobile-calendar.js" type="text/javascript"></script>
Quickstart
import Vue from 'vue' import Calendar from 'vue-mobile-calendar' Vue.use(Calendar)
<calendar v-model="calendarShow" :defaultDate="defaultDate" @change="handelChange"> </calendar>
Attributes
option | description | type | default |
---|---|---|---|
v-model | show/hide the calendar | Boolean | false |
format | format date | String | "yyyy-MM-dd" |
defaultDate | default selected date | Date | new Date() |
minDate | optional minimum date | Date | null |
maxDate | optional maximum date | Date | null |
closeByClickmask | close by mask | Boolean | true |
month | text of month | Array | ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"] |
week | text of day | Array | ["周一", "周二", "周三", "周四", "周五", "周六", "周日"] |
Events
event name | description | parameter of callback |
---|---|---|
change | when date change | (date,formatDate) |
Reference
您可能感兴趣的文章:
相关文章推荐
- vue 移动端日期选择组件 vue-mobile-calendar
- 移动端日期选择组件
- 详解React Native开源时间日期选择器组件(react-native-datetime)
- Vue无限滑动周选择日期的组件的示例代码
- vue地区选择组件教程详解
- 关于 Vue.js+Element-UI 日期控件 日期范围选择
- Android开发之日期时间选择组件事…
- 基于 Vue.js 的移动端组件库mint-ui
- react-native DatePicker日期选择组件的实现代码
- 详解Vue组件实现tips的总结
- Vue中封装input组件的实例详解
- vue内置组件transition简单原理图文详解(小结)
- vue移动端轻量级的轮播组件实现代码
- vue-router 组件复用问题详解
- vue省市区三联动下拉选择组件的实现
- 设置日期选择组件(DateField )的选择范围
- 日历显示,并且可选择日期,并显示选择过的日期详解
- JavaScript:日期选择器组件的使用
- 详解vue父子组件间传值(props)
- 设置日期选择组件DateField年选择范围和上下选择按钮.