From e1c0b856aa2f801a5b7809e019ac8e532e9a2a89 Mon Sep 17 00:00:00 2001 From: Haixing <65376724+HaixingOoO@users.noreply.github.com> Date: Wed, 4 Dec 2024 15:31:23 +0800 Subject: [PATCH] fix(DatePicker): fix DatePicker week parseToDayjs bug (#1994) Co-authored-by: Heising --- js/date-picker/format.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/date-picker/format.ts b/js/date-picker/format.ts index a1d8b254f9..6a3ef3573e 100644 --- a/js/date-picker/format.ts +++ b/js/date-picker/format.ts @@ -48,6 +48,8 @@ export function parseToDayjs( return nextWeek; } } + // 判断是week直接返回,否则经过YYYY-MM-D处理会导致错误 + return dayjs(dateText); } // format quarter