From 8b977a9a9d7c35c05cbb922f25604ff96e86857e Mon Sep 17 00:00:00 2001 From: Melloware Date: Fri, 30 Jun 2023 13:46:43 -0400 Subject: [PATCH] Fix #4568: Calendar focus state should change when displaying panel (#4584) --- 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,