Skip to content

Commit

Permalink
DatePicker: fix bug of only select min date of date range problem (#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
smk0621 authored and ziyoung committed Sep 2, 2019
1 parent b9eacfe commit 3f7d98b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/date-picker/src/panel/date-range.vue
Original file line number Diff line number Diff line change
Expand Up @@ -669,6 +669,7 @@
// NOTE: this is a hack to reset {min, max}Date on picker open.
// TODO: correct way of doing so is to refactor {min, max}Date to be dependent on value and internal selection state
// an alternative would be resetView whenever picker becomes visible, should also investigate date-panel's resetView
if (this.minDate && this.maxDate == null) this.rangeState.selecting = false;
this.minDate = this.value && isDate(this.value[0]) ? new Date(this.value[0]) : null;
this.maxDate = this.value && isDate(this.value[0]) ? new Date(this.value[1]) : null;
}
Expand Down

0 comments on commit 3f7d98b

Please sign in to comment.