From c38fed70be6b3a6500c9dbe20ef688ced5511b7f Mon Sep 17 00:00:00 2001 From: goo-yyh <45666106+goo-yyh@users.noreply.github.com> Date: Sun, 12 Jun 2022 12:37:46 +0800 Subject: [PATCH] fix(Calender): failed to render months after changing maxDate or minDate (#10668) Co-authored-by: yuyuehui.yyh --- packages/vant/src/calendar/Calendar.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/vant/src/calendar/Calendar.tsx b/packages/vant/src/calendar/Calendar.tsx index dd1baa47c..692354f76 100644 --- a/packages/vant/src/calendar/Calendar.tsx +++ b/packages/vant/src/calendar/Calendar.tsx @@ -185,6 +185,10 @@ export default defineComponent({ const months: Date[] = []; const cursor = new Date(props.minDate); + if (props.lazyRender && !props.show) { + return months; + } + cursor.setDate(1); do {