Commit bcf09be74478736aee367b6f79a2e8d0c3b0459d

Authored by Sergio Crisostomo
1 parent 71b68751

fix handlePick and remove console.log

removed if/else related to b52e02e4367002c01d04793c2e8059965aa26b80
src/components/date-picker/panel/Date/date-range.vue
... ... @@ -221,7 +221,6 @@
221 221 }
222 222 },
223 223 selectionMode(type){
224   - console.log('Selection type change!', type);
225 224 this.currentView = type || 'range';
226 225 }
227 226 },
... ...
src/components/date-picker/panel/Date/date.vue
... ... @@ -168,18 +168,12 @@
168 168 this.pickerTable = this.getTableType(this.currentView);
169 169 },
170 170 handlePick (value) {
171   - const {selectionMode, panelDate, pickerType} = this;
  171 + const {selectionMode, panelDate} = this;
172 172 if (selectionMode === 'year') value = new Date(value.getFullYear(), 0, 1);
173 173 else if (selectionMode === 'month') value = new Date(panelDate.getFullYear(), value.getMonth(), 1);
174 174 else value = new Date(value);
175 175  
176   - if (pickerType === selectionMode){
177   - this.$emit('on-pick', value);
178   - } else {
179   - this.selectionMode
180   - }
181   -
182   -
  176 + this.$emit('on-pick', value);
183 177 },
184 178 },
185 179 };
... ...