From 212c5a1cfb154f5cd0d7ac48ba47547992bcc894 Mon Sep 17 00:00:00 2001 From: mengshuicmq Date: Mon, 11 Sep 2023 11:36:16 +0800 Subject: [PATCH] fix: fix code review --- src/date-picker/lib/popups/date-popup.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/date-picker/lib/popups/date-popup.component.ts b/src/date-picker/lib/popups/date-popup.component.ts index 217af8fa6..f2872fa5f 100644 --- a/src/date-picker/lib/popups/date-popup.component.ts +++ b/src/date-picker/lib/popups/date-popup.component.ts @@ -499,7 +499,7 @@ export class DatePopupComponent implements OnChanges, OnInit { const [start, end] = value; const newStart = start || new TinyDate(); let newEnd = end; - if (!newEnd || (end && newStart.isSame(end, headerMode as TinyDateCompareGrain))) { + if (!newEnd || (newEnd && newStart.isSame(newEnd, headerMode as TinyDateCompareGrain))) { newEnd = dateAddAmount(newStart, 1, headerMode); } return [newStart, newEnd];