Skip to content

Commit 6db5fa0

Browse files
authored
fix: show date selection onClick (#8359)
1 parent f9ea8f3 commit 6db5fa0

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

components/lib/calendar/Calendar.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,12 @@ export const Calendar = React.memo(
100100
return props.dateFormat || localeOption('dateFormat', props.locale);
101101
};
102102

103+
const onInputClick = () => {
104+
if (!visible && props.showOnFocus) {
105+
show();
106+
}
107+
};
108+
103109
const onInputFocus = (event) => {
104110
if (ignoreFocusFunctionality.current) {
105111
setFocusedState(true);
@@ -4215,6 +4221,7 @@ export const Calendar = React.memo(
42154221
autoComplete="off"
42164222
placeholder={props.placeholder}
42174223
tabIndex={props.tabIndex}
4224+
onClick={onInputClick}
42184225
onInput={onUserInput}
42194226
onFocus={onInputFocus}
42204227
onBlur={onInputBlur}

0 commit comments

Comments
 (0)