month range component about iview
npm install iview-datepicker-monthrangejs
npm install --save iview-datepicker-monthrange
`
Use it:
`bash
import MonthRangeDatePicker from 'iview-datepicker-monthrange'
Vue.use(MonthRangeDatePicker);
`
`bash
`
!You should use type="daterange"。
And you need add:
`js
`
Want to get the input date:
`bash
methods: {
daterange(data) {
console.log(data);
}
}
`
Disabled Date:
`bash
data() {
return {
options1: {
disabledDate (year, month) {
let disabledDate = (month < 10) ? year + '-0' + month : year + '-' + month;
return disabledDate < '2017-11' || disabledDate > '2018-05';
}
}
}
}
``