From 0f4e8c51f881013f42cfd4c1b373f2a36cd729f6 Mon Sep 17 00:00:00 2001 From: mengshuicmq Date: Mon, 11 Sep 2023 11:41:52 +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 f2872fa5f..f571281e1 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 || (newEnd && newStart.isSame(newEnd, headerMode as TinyDateCompareGrain))) { + if (!newEnd || newStart.isSame(end, headerMode as TinyDateCompareGrain)) { newEnd = dateAddAmount(newStart, 1, headerMode); } return [newStart, newEnd];