0.2.0 • Published 5 years ago

@mrhanson/el-calendar v0.2.0

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

el-calendar

element-ui style calendar widget, typescript friendly

npm npm bundle size npm

demonstration

Live Demo

https://mrhanson.github.io/el-calendar/

Install

# npm
npm i @mrhanson/el-calendar

# yarn
yarn add @mrhanson/el-calendar

Changelog

Usage

<template>
  <Calendar ref="calendar" v-model="selectedDate"></Calendar>
</template>

<script>
  import Calendar from '@mrhanson/el-calendar'

  export default {
    components: { Calendar }

    data() {
      return {
        selectedDate: new Date()
      }
    }
  }
</script>

Props

NameTypeDefaultOptionsDescription
value/v-modelDatenew Date()--Selected Date value
todayDatenew Date()--Used to set server time
localestring'cn''cn','en'i18n
dotArrArray[]show dot under date or not, Notice:length of dotArr must be same as
max date of current month

''`

Events

NameParamsDescription
premonthemit when vision moves to previous month
nextmonthemit when vision moves to next month
preyearemit when vision moves to previous year
nextyearemit when vision moves to next year

Methods

MethodsParamsDescription
backToToday()set value & vision back to today
toPreMonth()set vision to previous month
toNextMonth()set vision to previous month
toSpecificDate(year, month, date)year: number, month: number, date: numberset value & vision to specific date

Slots

nameDescription
commentUsed to add some comment under calendar
0.2.0

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago