https://github.com/wangweianger/vue-calendar
vue1 vue2 小巧全面的时间选择组件 支持双选择器
https://github.com/wangweianger/vue-calendar
Last synced: 2 days ago
JSON representation
vue1 vue2 小巧全面的时间选择组件 支持双选择器
- Host: GitHub
- URL: https://github.com/wangweianger/vue-calendar
- Owner: wangweianger
- Created: 2017-09-29T01:48:08.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-09-29T09:17:03.000Z (almost 9 years ago)
- Last Synced: 2025-02-08T12:11:14.463Z (over 1 year ago)
- Language: Vue
- Size: 8.79 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# vue-calendar
### Case pictures



### Requirements
> * Vue.js 1.1.0 ~ 适用于vue1.0版本
> * Vue.js 2.3.0 ~ 2.0vue版本需要大于2.3.0版本
> *依赖插件为:zane-calendar ,不依赖任何第三方插件,包大小26K
### Demo
http://www.seosiwei.com/zaneDate/index.html //参数一致
### Instllation
```
$ npm install vue-date-calendar@1.2.0 vue1.0版本
$ npm install vue-date-calendar vue2.0版本
```
### Usage
```
import vueDateCalendar from 'vue-date-calendar'
export default {
components: {
vueDateCalendar
},
data(){
return {
option{
elem:'#zane-calendar', 控件的dom原生 注意:仅限制于id选择器 (必填,id前必须有#号)
type:'day', 可选类型 day year month time doubleday doubleyear doublemonth doubletime (必填)
lang:'cn', 可选择语言类型 cn , en (可选)
width:280, 插件宽度配置 250 <= X <= 500 (可选)
height:300, 插件高度配置 250 <= X <= 350 (可选)
behindTop:10, 插件于输入框的高度 (可选)
format:'yyyy-MM-dd HH:mm:ss', 时间格式化 (可选)
value:'', 插件初始默认值 (参数名必须,双向绑定value值)
min:'', 可选取时间最小范围 1900-10-01 (可选)
max: '', 可选取时间最大范围 2099-12-31 (可选)
zindex:100, z-index值 (可选)
showtime:true, 是否显示选择时间 (可选)
showclean:true, 是否显示清除按钮 (可选)
shownow:true, 是否显示当前按钮 (可选)
showsubmit:true, 是否显示提交按钮 (可选)
haveBotBtns:true, 是否有底部按钮列表 (可选)
calendarName:'', 此参数勿动 表示当前时间插件实例化对象 (可选)
mounted:()=>{}, 插件加载完成之后调用 (可选)
change:()=>{}, 时间变更之后调用 (可选)
done:()=>{}, 选择完成之后调用 (可选)
}
}
}
}
//常用的option方式
option:{
elem:"#demo1",
type:'year',
fromate:'yyyy-MM-dd'
}
option:{
elem:"#demo2",
type:'doubleday',
fromate:'yyyy-MM-dd',
showtime:true,
}
//参数配合会有很多的功能
```
### License
The MIT License