From e5cc32ca97c4dd938fe0b86957a5bb3d70803e76 Mon Sep 17 00:00:00 2001 From: neverland Date: Sat, 13 Aug 2022 12:03:07 +0800 Subject: [PATCH] fix(Calendar): reading getFullYear error in some cases (#10909) --- packages/vant/src/calendar/Calendar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vant/src/calendar/Calendar.tsx b/packages/vant/src/calendar/Calendar.tsx index 325aef8b8..b7f727e38 100644 --- a/packages/vant/src/calendar/Calendar.tsx +++ b/packages/vant/src/calendar/Calendar.tsx @@ -299,7 +299,7 @@ export default defineComponent({ props.type === 'single' ? (currentDate.value as Date) : (currentDate.value as Date[])[0]; - if (targetDate) { + if (isDate(targetDate)) { scrollToDate(targetDate); } } else {