0.2.9 • Published 2 years ago
v-month-picker v0.2.9
v-month-picker
Description
Simple year and month picker inspired by vuetify's monthpicker. Vue component compatible with Vue 2.x
Demo
To view a demo online: CodeSandBox
To view demo examples locally clone the repo and run npm install && npm run serve
Install
Use npm: npm i v-month-picker --save
Add to project
global
// main.js
import MonthPicker from "v-month-picker";
Vue.component('MonthPicker', MonthPicker);
locale
import MonthPicker from 'v-month-picker';
export default {
components: {
MonthPicker
}
// your code...
}
Usage
Below code in the <template>
:
<MonthPicker horizontal-align="left" vertical-align="bottom" locale="en" v-model="date"/>
Available props
Prop | Type | Default | Description |
---|---|---|---|
v-model (required) | String | Date in ISO format | |
horizontal-align | String | bottom | Horizontal positioning of the popup |
vertical-align | String | center | Vertical positioning of the popup |
locale | String | ru | Translation for months |
first-year | String | 1950 | Start year |
last-year | String | 2049 | End year |
Dependencies
License
MIT
This is my first npm package, please don't hit me ;)