vue-calendar-zy
v1.1.2
Published
vue-calendar-zy
Downloads
4
Readme
vue-calendar-zy
Demo
Installation
npm
$ npm install vue-calendar-zy
Requirements
import calendar from 'vue-calendar-zy'
Vue.use(calendar);
<template>
<div id="app">
<calendar @calendartime="gettime"/>
or
<calendar @calendartime="gettime" :userTime="time" userNeedHm="1" :userFormat="format" userLang="zh"/>
</div>
</template>
<script>
export default {
name: 'App',
data (){
return {
time : '2018-05-12 20:20',
format : 'YYYY-MM-DD HH:mm'
}
},
methods : {
gettime(time){
this.time = time;
}
}
}
</script>
API
- userNeedHm
userNeedHm 0 or 1 ,default 1 ,is show hour-minute panel
- userTime
userTime '2018-04-11 15:23' or new Date() , default new Date()
- userLang
userLang zh or en ,default zh
- userFormat
userFormat time format ,such as 'YYYY-MM-DD HH:mm' or 'YYYY-MM-DD' ,default YYYY-MM-DD HH:mm
- calendartime
function get set time