age filter fix 2 (#2928)

This commit is contained in:
Igor Stuev
2025-08-08 14:47:15 +02:00
committed by GitHub
parent 6db954ab3b
commit 11c001864d
+4 -1
View File
@@ -33,7 +33,10 @@ const DateInput = ({ value, onChange, placeholder, max }: { value: string; onCha
const [ tempValue, setTempValue ] = React.useState(value ? dayjs(value).format('YYYY-MM-DD') : '');
React.useEffect(() => {
setTempValue(value ? dayjs(value).format('YYYY-MM-DD') : '');
// reset
if (!value) {
setTempValue('');
}
}, [ value ]);
const handleChange = React.useCallback((event: ChangeEvent<HTMLInputElement>) => {