From 8d5323069b131d3b73cf119455750956358c9dea Mon Sep 17 00:00:00 2001 From: Sergio Crisostomo Date: Fri, 2 Feb 2018 10:58:09 +0100 Subject: [PATCH] update panel date on every value change --- src/components/date-picker/panel/Date/date.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/date-picker/panel/Date/date.vue b/src/components/date-picker/panel/Date/date.vue index 7cf97753..e1157920 100644 --- a/src/components/date-picker/panel/Date/date.vue +++ b/src/components/date-picker/panel/Date/date.vue @@ -116,7 +116,7 @@ ]; }, panelPickerHandlers(){ - return this.pickerTable === `${this.currentView}-table` ? this.handlePick : this.handlePreSelection + return this.pickerTable === `${this.currentView}-table` ? this.handlePick : this.handlePreSelection; }, datePanelLabel () { const locale = this.t('i.locale'); @@ -140,7 +140,7 @@ watch: { value (newVal) { this.dates = newVal; - if (JSON.stringify(newVal) === '[null]') this.panelDate = this.startDate || new Date(); + this.panelDate = this.startDate || this.dates[0] || new Date(); }, currentView (currentView) { this.$emit('on-selection-mode-change', currentView);