Commit 8d5323069b131d3b73cf119455750956358c9dea

Authored by Sergio Crisostomo
1 parent 7d6ea205

update panel date on every value change

Showing 1 changed file with 2 additions and 2 deletions   Show diff stats
src/components/date-picker/panel/Date/date.vue
... ... @@ -116,7 +116,7 @@
116 116 ];
117 117 },
118 118 panelPickerHandlers(){
119   - return this.pickerTable === `${this.currentView}-table` ? this.handlePick : this.handlePreSelection
  119 + return this.pickerTable === `${this.currentView}-table` ? this.handlePick : this.handlePreSelection;
120 120 },
121 121 datePanelLabel () {
122 122 const locale = this.t('i.locale');
... ... @@ -140,7 +140,7 @@
140 140 watch: {
141 141 value (newVal) {
142 142 this.dates = newVal;
143   - if (JSON.stringify(newVal) === '[null]') this.panelDate = this.startDate || new Date();
  143 + this.panelDate = this.startDate || this.dates[0] || new Date();
144 144 },
145 145 currentView (currentView) {
146 146 this.$emit('on-selection-mode-change', currentView);
... ...