From a113c09bbd796c2c39e7b621124e92cf714a1389 Mon Sep 17 00:00:00 2001 From: melloware Date: Fri, 30 Jun 2023 13:42:46 -0400 Subject: [PATCH] Fix #4568: Calendar focus state should change when displaying panel --- components/lib/calendar/Calendar.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/lib/calendar/Calendar.js b/components/lib/calendar/Calendar.js index 6644b1426c..b4d3434075 100644 --- a/components/lib/calendar/Calendar.js +++ b/components/lib/calendar/Calendar.js @@ -84,7 +84,6 @@ export const Calendar = React.memo( }; const onInputBlur = (event) => { - setFocusedState(false); !props.keepInvalid && updateInputfield(props.value); props.onBlur && props.onBlur(event); }; @@ -1439,6 +1438,8 @@ export const Calendar = React.memo( }; const show = (type) => { + setFocusedState(false); + if (props.onVisibleChange) { props.onVisibleChange({ visible: true,