diff --git a/src/components/DatePicker/components/Day/Day.tsx b/src/components/DatePicker/components/Day/Day.tsx index 7d85797617e..8413e5f0087 100644 --- a/src/components/DatePicker/components/Day/Day.tsx +++ b/src/components/DatePicker/components/Day/Day.tsx @@ -14,7 +14,7 @@ export interface DayProps { disabled?: boolean; onClick?(day: Date): void; onHover?(day?: Date): void; - onFocus?(day?: Date): void; + onFocus?(day: Date): void; } export function Day({ @@ -31,14 +31,11 @@ export function Day({ const i18n = useI18n(); const dayNode = useRef(null); - useEffect( - () => { - if (focused && dayNode.current) { - dayNode.current.focus(); - } - }, - [focused], - ); + useEffect(() => { + if (focused && dayNode.current) { + dayNode.current.focus(); + } + }, [focused]); if (!day) { return
onHover(day)} />;