diff --git a/src/date-picker/panel/PanelContent.tsx b/src/date-picker/panel/PanelContent.tsx index 56a2b962f4..79e30cfc54 100644 --- a/src/date-picker/panel/PanelContent.tsx +++ b/src/date-picker/panel/PanelContent.tsx @@ -62,20 +62,29 @@ export default function PanelContent(props: PanelContentProps) { const defaultTime = '00:00:00'; - const onMonthChangeInner = useCallback((val: number) => { - onMonthChange?.(val, { partial }); + const onMonthChangeInner = useCallback( + (val: number) => { + onMonthChange?.(val, { partial }); + }, // eslint-disable-next-line - }, []); + [partial], + ); - const onYearChangeInner = useCallback((val: number) => { - onYearChange?.(val, { partial }); + const onYearChangeInner = useCallback( + (val: number) => { + onYearChange?.(val, { partial }); + }, // eslint-disable-next-line - }, []); + [partial], + ); - const onJumperClickInner = useCallback(({ trigger }) => { - onJumperClick?.({ trigger, partial }); + const onJumperClickInner = useCallback( + ({ trigger }) => { + onJumperClick?.({ trigger, partial }); + }, // eslint-disable-next-line - }, []); + [partial], + ); return (