move logic to inside the correct if clause
This commit is contained in:
parent
34867ff9a9
commit
b990d2f413
1 changed files with 2 additions and 2 deletions
|
@ -312,11 +312,11 @@
|
||||||
},
|
},
|
||||||
handleRangePick (val) {
|
handleRangePick (val) {
|
||||||
if (this.rangeState.selecting || this.currentView === 'time'){
|
if (this.rangeState.selecting || this.currentView === 'time'){
|
||||||
const [minDate, maxDate] = [this.rangeState.from, val].sort(dateSorter);
|
|
||||||
this.dates = [minDate, maxDate];
|
|
||||||
if (this.currentView === 'time'){
|
if (this.currentView === 'time'){
|
||||||
this.dates = val;
|
this.dates = val;
|
||||||
} else {
|
} else {
|
||||||
|
const [minDate, maxDate] = [this.rangeState.from, val].sort(dateSorter);
|
||||||
|
this.dates = [minDate, maxDate];
|
||||||
this.rangeState = {
|
this.rangeState = {
|
||||||
from: minDate,
|
from: minDate,
|
||||||
to: maxDate,
|
to: maxDate,
|
||||||
|
|
Loading…
Add table
Reference in a new issue