mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-11-22 08:46:39 -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';
|
||||
}
|
||||
|
||||
const handleChange = (dateVal, stringVal) => {
|
||||
onChange(stringVal);
|
||||
const handleChange = (dateVal) => {
|
||||
if(DateFns.isValid(dateVal)) {
|
||||
onChange(DateFns.format(dateVal, format));
|
||||
} else{
|
||||
onChange(null);
|
||||
}
|
||||
};
|
||||
|
||||
/* Value should be a date object instead of string */
|
||||
|
Loading…
Reference in New Issue
Block a user