From 0eae222b88e0201c6daaa57d09e0a3a601eb4c9d Mon Sep 17 00:00:00 2001 From: Alan Wang Date: Fri, 25 Mar 2022 23:21:56 -0400 Subject: [PATCH] fix(calendar): scrollToDate method is invalid (#10432) --- 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 6ddfa66c8..dd1baa47c 100644 --- a/packages/vant/src/calendar/Calendar.tsx +++ b/packages/vant/src/calendar/Calendar.tsx @@ -308,8 +308,8 @@ export default defineComponent({ // add Math.floor to avoid decimal height issues // https://github.com/youzan/vant/issues/5640 bodyHeight = Math.floor(useRect(bodyRef).height); - scrollToCurrentDate(); }); + scrollToCurrentDate(); }; const reset = (date = getInitialDate()) => {