mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fix the date-time picker broken after MUI5 upgrade.
This commit is contained in:
parent
84c024f6fa
commit
673b5ea5a1
@ -268,8 +268,12 @@ export function InputDateTimePicker({ value, onChange, readonly, controlProps, .
|
|||||||
placeholder = controlProps.placeholder || 'YYYY-MM-DD HH:mm:ss Z';
|
placeholder = controlProps.placeholder || 'YYYY-MM-DD HH:mm:ss Z';
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleChange = (dateVal, stringVal) => {
|
const handleChange = (dateVal) => {
|
||||||
onChange(stringVal);
|
if(DateFns.isValid(dateVal)) {
|
||||||
|
onChange(DateFns.format(dateVal, format));
|
||||||
|
} else{
|
||||||
|
onChange(null);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Value should be a date object instead of string */
|
/* Value should be a date object instead of string */
|
||||||
|
Loading…
Reference in New Issue
Block a user