fix handlePick and remove console.log

removed if/else related to b52e02e436
This commit is contained in:
Sergio Crisostomo 2018-01-24 11:34:50 +01:00
parent 71b68751f8
commit bcf09be744
2 changed files with 2 additions and 9 deletions

View file

@ -221,7 +221,6 @@
}
},
selectionMode(type){
console.log('Selection type change!', type);
this.currentView = type || 'range';
}
},

View file

@ -168,18 +168,12 @@
this.pickerTable = this.getTableType(this.currentView);
},
handlePick (value) {
const {selectionMode, panelDate, pickerType} = this;
const {selectionMode, panelDate} = this;
if (selectionMode === 'year') value = new Date(value.getFullYear(), 0, 1);
else if (selectionMode === 'month') value = new Date(panelDate.getFullYear(), value.getMonth(), 1);
else value = new Date(value);
if (pickerType === selectionMode){
this.$emit('on-pick', value);
} else {
this.selectionMode
}
this.$emit('on-pick', value);
},
},
};