From d692b708affacbecd53b93fc1921e2b4d806f3a6 Mon Sep 17 00:00:00 2001 From: johnsonwong666 <64689255+johnsonwong666@users.noreply.github.com> Date: Tue, 22 Aug 2023 10:05:08 +0800 Subject: [PATCH] fix: add observer for limit date change (#5520) --- packages/calendar/index.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/calendar/index.ts b/packages/calendar/index.ts index 4c897360..3c58f8c9 100644 --- a/packages/calendar/index.ts +++ b/packages/calendar/index.ts @@ -144,6 +144,15 @@ VantComponent({ scrollIntoView: '', }, + watch: { + minDate() { + this.initRect(); + }, + maxDate() { + this.initRect(); + }, + }, + created() { this.setData({ currentDate: this.getInitialDate(this.data.defaultDate),