Commit 6f8160270de5598f209f4a90271dbbfe19524eeb
1 parent
737e9b8d
Don't parse multiple dates
Correct change added in https://github.com/iview/iview/pull/4253
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
src/components/date-picker/picker.vue
... | ... | @@ -646,7 +646,6 @@ |
646 | 646 | } |
647 | 647 | }, |
648 | 648 | onPick(dates, visible = false, type) { |
649 | - dates = this.parseDate(dates); | |
650 | 649 | if (this.multiple){ |
651 | 650 | const pickedTimeStamp = dates.getTime(); |
652 | 651 | const indexOfPickedDate = this.internalValue.findIndex(date => date && date.getTime() === pickedTimeStamp); |
... | ... | @@ -654,6 +653,7 @@ |
654 | 653 | const timeStamps = allDates.map(date => date.getTime()).filter((ts, i, arr) => arr.indexOf(ts) === i && i !== indexOfPickedDate); // filter away duplicates |
655 | 654 | this.internalValue = timeStamps.map(ts => new Date(ts)); |
656 | 655 | } else { |
656 | + dates = this.parseDate(dates); | |
657 | 657 | this.internalValue = Array.isArray(dates) ? dates : [dates]; |
658 | 658 | } |
659 | 659 | ... | ... |