Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/aaronw-be/vuejs-calendar

A calendar component for vuejs2
https://github.com/aaronw-be/vuejs-calendar

calendar-component vuejs vuejs-calendar vuejs-components vuejs2

Last synced: 3 months ago
JSON representation

A calendar component for vuejs2

Awesome Lists containing this project

README

        

[![Known Vulnerabilities](https://snyk.io/test/npm/vuejs-calendar/badge.svg)](https://snyk.io/test/npm/vuejs-calendar)

# vuejs-calendar
A calendar component for vuejs2

![screenshot](https://github.com/AaronWB/vuejs-calendar/raw/master/screenShot.png)

## Usage

## Install
` npm install vuejs-calendar --save `

## Reference in your project
> demo.vue
``` html



import calendar from 'vuejs-calendar'
export default {
name: 'app',
components: {
calendar
},
...
}
```

## Optional Events
* ` dateChanged(date) `
* ` SwitchPreviousMonth(from, to) `
* ` SwitchNextMonth(from, to) `

## Props
* ` debug (default: false) `

## Example
```javascript



```
```javascript

import calendar from 'vuejs-calendar'
export default {
components: {
calendar
},
methods: {
pre (from, to){
console.group('pre month')
console.log('from',from)
console.log('to',to)
console.groupEnd()
},
next (from, to) {
console.group('next month')
console.log('from',from)
console.log('to',to)
console.groupEnd()
},
changed (to){
console.log('changed to',to)
}
}
}

````

## Next Version
* Add custom active date
* support more style

# vuejs-calendar
一款vuejs日历组件

![screenshot](https://github.com/AaronWB/vuejs-calendar/raw/master/screenShot.png)

## 使用方法

## 安装
`npm install vuejs-calendar --save`

` cnpm install vuejs-calendar --save ` (淘宝npm镜像)

## 在项目中引用
> demo.vue
``` html



import calendar from 'vuejs-calendar'
export default {
name: 'app',
components: {
calendar
},
...
}
```

## 可用事件
* ` dateChanged(date) ` 日期改变时触发
* ` SwitchPreviousMonth(from, to) ` 切换到上月时触发
* ` SwitchNextMonth(from, to) ` 切换到下月时触发

## props
* ` debug (default: false) `

## 示例
```html



```
```javascript

import calendar from 'vuejs-calendar'
export default {
components: {
calendar
},
methods: {
pre (from, to){
console.group('pre month')
console.log('from',from)
console.log('to',to)
console.groupEnd()
},
next (from, to) {
console.group('next month')
console.log('from',from)
console.log('to',to)
console.groupEnd()
},
changed (to){
console.log('changed to',to)
}
}
}

````

# 下一个版本
* 增加自定义初始日期
* 增加更多样式

## ` Features`
* 农历支持