Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/aaronw-be/vuejs-calendar
- Owner: AaronW-BE
- Created: 2017-03-08T09:34:39.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-05-28T03:07:11.000Z (over 5 years ago)
- Last Synced: 2024-03-23T16:01:32.865Z (10 months ago)
- Topics: calendar-component, vuejs, vuejs-calendar, vuejs-components, vuejs2
- Language: Vue
- Homepage: https://aaronW-be.github.io/vuejs-calendar/
- Size: 22.5 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
```
```javascriptimport 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
```
```javascriptimport 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`
* 农历支持