Skip to content

Commit

Permalink
chore: fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
AtsushiM committed Feb 6, 2025
1 parent bd555c4 commit bc6404f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/smarthr-ui/src/components/DatePicker/DatePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ export const DatePicker = forwardRef<HTMLInputElement, Props & InputAttributes>(
(e: React.KeyboardEvent) => {
if (ESCAPE_KEY_REGEX.test(e.key)) {
e.stopPropagation()
// delay hiding calendar because calendar will be displayed when input is focused
requestAnimationFrame(closeCalendar)

if (inputRef.current) inputRef.current.focus()
Expand All @@ -323,7 +324,7 @@ export const DatePicker = forwardRef<HTMLInputElement, Props & InputAttributes>(
updateDate(stringToDate(e.currentTarget.value))
}
},
[isCalendarShown, updateDate, closeCalendar, openCalendar],
[isCalendarShown, updateDate, closeCalendar, openCalendar, stringToDate],
)
const onFocusInput = useCallback(() => {
setIsInputFocused(true)
Expand Down

0 comments on commit bc6404f

Please sign in to comment.