update DatePicker

update DatePicker
This commit is contained in:
梁灏 2016-12-16 09:18:35 +08:00
parent 344131a7af
commit 13be443453
4 changed files with 14 additions and 6 deletions

View file

@ -13,7 +13,10 @@
month: {
type: Number
},
disabledDate: {}
disabledDate: {},
selectionMode: {
default: 'month'
}
},
computed: {
classes () {
@ -36,7 +39,7 @@
const date = new Date(this.date);
date.setMonth(i);
cell.disabled = typeof this.disabledDate === 'function' && this.disabledDate(date);
cell.disabled = typeof this.disabledDate === 'function' && this.disabledDate(date) && this.selectionMode === 'month';
cell.selected = Number(this.month) === i;
cells.push(cell);