1.0.2 • Published 7 years ago

vue2-calendar v1.0.2

Weekly downloads
16
License
-
Repository
github
Last release
7 years ago

vue2-calendar

A calendar component for vue.js compitable with vue 2.x

Based on GilbertSun/vue-calendar

if you want to use calendar component for vue.js(1.x), please visit

GilbertSun/vue-calendar

examples

website: necfol/vue2-calendar

install & use

npm install vue-calendar-mobile

use in a vue component

<template>
<calendar :view="'month'"></calendar>
</template>

<script>
import Calendar from 'vue2-calendar'

export default {
  components: {
    Calendar
  }
}
</script>

Develope

you want to change the source and see what's you change

$ make dev

it will server a locale demo page in http://localhost:8080

then you change change the source code in src directory

refresh the demo page

$ make deploy

publish to npm

$ make pub

API

proptypedescriptionexampledefault value
currentViewObjectcureent shown view{}, simple pass a clean object{start: Object, end: Object}
decorateObjectcontrol the date to have a dot docorate{'2016-08-09': true}{}
i18nStringcontrol week name language'zh-cn', 'en''zh-cn'
indicatorObjectcontrol the header indicator default the year and month{title: ..., main: ...}{}
selectedDatecurrent select datenew Date(2016, 11, 6)new Date()
startMondayBooleanis the week start from monday, true for monday and false for sundaytruefalse
startDateDatethis start Date to control the first view to show startDatenew Date(2016, 11, 6)new Date()
viewStringshow to month view of week view'month', 'week''month'
centerHeaderBooleancontrol the calendar header positiontruefalse
1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago