From b990d2f4134dc2b425d63f705dec0c5ee4f304c2 Mon Sep 17 00:00:00 2001
From: Sergio Crisostomo <sergiosbox@gmail.com>
Date: Fri, 2 Feb 2018 11:21:37 +0100
Subject: [PATCH] move logic to inside the correct if clause

---
 src/components/date-picker/panel/Date/date-range.vue | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/components/date-picker/panel/Date/date-range.vue b/src/components/date-picker/panel/Date/date-range.vue
index 2305c5a..9f721df 100644
--- a/src/components/date-picker/panel/Date/date-range.vue
+++ b/src/components/date-picker/panel/Date/date-range.vue
@@ -312,11 +312,11 @@
             },
             handleRangePick (val) {
                 if (this.rangeState.selecting || this.currentView === 'time'){
-                    const [minDate, maxDate] = [this.rangeState.from, val].sort(dateSorter);
-                    this.dates = [minDate, maxDate];
                     if (this.currentView === 'time'){
                         this.dates = val;
                     } else {
+                        const [minDate, maxDate] = [this.rangeState.from, val].sort(dateSorter);
+                        this.dates = [minDate, maxDate];
                         this.rangeState = {
                             from: minDate,
                             to: maxDate,
--
libgit2 0.21.4