From db2b7d3bc490b2b1f72dadfa6e02ead95f2aac16 Mon Sep 17 00:00:00 2001 From: wanghaoyu Date: Thu, 21 Jul 2022 16:14:57 +0800 Subject: [PATCH] =?UTF-8?q?date-range:=20=E4=BF=AE=E5=A4=8Dunlink-panels?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E6=97=A0=E6=B3=95=E5=8F=96=E6=B6=88time?= =?UTF-8?q?=E8=81=94=E5=8A=A8bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/date-picker/src/panel/date-range.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/date-picker/src/panel/date-range.vue b/packages/date-picker/src/panel/date-range.vue index 7423bb46c..dbe745a1f 100644 --- a/packages/date-picker/src/panel/date-range.vue +++ b/packages/date-picker/src/panel/date-range.vue @@ -571,7 +571,7 @@ this.minTimePickerVisible = visible; } - if (!this.maxDate || this.maxDate && this.maxDate.getTime() < this.minDate.getTime()) { + if (!this.unlinkPanels && (!this.maxDate || this.maxDate && this.maxDate.getTime() < this.minDate.getTime())) { this.maxDate = new Date(this.minDate); } }, @@ -589,7 +589,7 @@ this.maxTimePickerVisible = visible; } - if (this.maxDate && this.minDate && this.minDate.getTime() > this.maxDate.getTime()) { + if (!this.unlinkPanels && (this.maxDate && this.minDate && this.minDate.getTime() > this.maxDate.getTime())) { this.minDate = new Date(this.maxDate); } },