From 88a327fa4fb1ba860777ad36351875f5294d2e22 Mon Sep 17 00:00:00 2001 From: zycoJamie <410752387@qq.com> Date: Wed, 28 Jul 2021 17:15:44 +0800 Subject: [PATCH] fix(date-picker): date-picker focus end-time resets start-time (#2290) --- packages/date-picker/src/date-picker-com/panel-date-range.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/date-picker/src/date-picker-com/panel-date-range.vue b/packages/date-picker/src/date-picker-com/panel-date-range.vue index 844dcebb0e..dd06c7b294 100644 --- a/packages/date-picker/src/date-picker-com/panel-date-range.vue +++ b/packages/date-picker/src/date-picker-com/panel-date-range.vue @@ -527,6 +527,8 @@ export default defineComponent({ if (!maxDate.value || maxDate.value.isBefore(minDate.value)) { maxDate.value = minDate.value + rightDate.value = maxDate.value + rightDate.value = rightDate.value.add(1, 'month') } } @@ -543,6 +545,7 @@ export default defineComponent({ if (maxDate.value && maxDate.value.isBefore(minDate.value)) { minDate.value = maxDate.value + leftDate.value = minDate.value } }