From a1153204afdd073c0d00ef762e27e75c09983474 Mon Sep 17 00:00:00 2001 From: Zakir Nuriev Date: Thu, 11 Aug 2022 14:29:41 +0300 Subject: [PATCH] Fix #3153: update the current view on change (#3153) --- components/lib/calendar/Calendar.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/lib/calendar/Calendar.js b/components/lib/calendar/Calendar.js index 939a5c7cff..bc0db37a6c 100644 --- a/components/lib/calendar/Calendar.js +++ b/components/lib/calendar/Calendar.js @@ -2451,6 +2451,10 @@ export const Calendar = React.memo(React.forwardRef((props, ref) => { } }); + useUpdateEffect(() => { + setCurrentView(props.view); + }, [props.view]) + useUpdateEffect(() => { if (!props.onViewDateChange && !viewStateChanged.current) { let propValue = props.value;