1.2.0 • Published 3 years ago
vue-cli-plugin-month-picker v1.2.0
vue-month-picker
- Author: Tony Hoang
- Email: chienhd@sudobo.com
A Vue.js search select component with NO dependencies.
Version 0.3.7
- Support Vue.js from version 2.x and later
There are two files.
- VueMonthPicker.common.js
- common js bundle for consuming via bundlers(webpack)
- VueMonthPicker.umd.js
- umd bundle for browser
Release Notes
https://github.com/chienhd/vue-month-picker
Demo
https://github.com/chienhd/vue-month-picker
Usage
Install
npm
npm install --save vue-month-picker
yarn
yarn add vue-month-picker
Sample code
<template>
<div>
<month-picker
@fiscal-month="getFiscalMonth"
:propsMonth="{
startFiscalMonth: startFiscalMonth,
startMonth: startMonth,
endMonth: endMonth,
quarterOfYear: quarterOfYear
}">
</month-picker>
</div>
</template>
<script>
import MonthPicker from 'vue-month-picker'
export default {
data () {
return {
startFiscalMonth: 1,
startMonth: 1,
endMonth: 3,
quarterOfYear: false
}
},
methods: {
getFiscalMonth(payload) {
console.log(payload)
}
},
components: {
MonthPicker
}
}
</script>
Props
Component: MonthPicker
Name | Type | Default | Description |
---|---|---|---|
startFiscalMonth | Number | 1 | the starting month of the fiscal year |
startMonth | Number | 1 | the starting month of the fiscal year that is currently viewed or active |
endMonth | Number | 12 | the ending month of the fiscal year that is currently viewed or active |
quarterOfYear | Boolean | false | determines that it is either the quarters of the year or the months of the year |
:fiscal-month | Function | return Object | it returns an object |