vue-monthly-picker
Version:
Vue Monthly Picker
72 lines (54 loc) • 2.93 kB
Markdown
//badge.fury.io/js/vue-monthly-picker.svg)](https://badge.fury.io/js/vue-monthly-picker)
[](https://circleci.com/gh/ittus/vue-monthly-picker)
Checkout demo at https://ittus.github.io/vue-monthly-picker/
<a href="https://www.buymeacoffee.com/8buMYCOog" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy Me A Coffee" style="height: auto !important;width: auto !important;"></a>
```
npm install vue-monthly-picker --save
```
```javascript
import VueMonthlyPicker from 'vue-monthly-picker'
Vue.component('my-component', {
components: {
VueMonthlyPicker
}
});
```
```html
<vue-monthly-picker
v-model="selectedMonth">
</vue-monthly-picker>
```
**Note**: `v-model` binding value need to be a **moment** object
| Prop | Type | Default | Description |
|-----------------------|-----------------|-------------|------------------------------------------|
| disabled | Boolean | `false` | Enable/disable component |
| monthLabels | Array | `['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12']` | Customize month labels |
| placeHolder | String | '' | Place holder when value is null |
| min | moment | `null` | Minimum time to select |
| max | moment | `null` | Maximum time to select |
| dateFormat | String | `YYYY/MM` | Display format. |
| value | moment | `null` | Moment value of selected month and year |
| alignment | String | `left` | Alignment of input value, possible value: `left`, `right`, `center` |
| selectedBackgroundColor | String | `
| clearOption | Boolean | true | Show/Hide clear option |
| Event | Params | Description |
|-------|--------|-------------|
|selected| selected month in `moment`| A month has been selected |
``` bash
yarn install
yarn dev
yarn build
yarn test
```
> Vue Monthly Picker Components
[![npm version](https: