diff --git a/web/pgadmin/static/js/components/FormComponents.jsx b/web/pgadmin/static/js/components/FormComponents.jsx index 58e3d67ca..3254acfad 100644 --- a/web/pgadmin/static/js/components/FormComponents.jsx +++ b/web/pgadmin/static/js/components/FormComponents.jsx @@ -189,7 +189,6 @@ FormInputSQL.propTypes = { }; export function InputDateTimePicker({value, onChange, readonly, controlProps, ...props}) { - const classes = useStyles(); const onDateTimeChange = (momentVal)=> { onChange(momentVal ? momentVal.format(controlProps.format || 'YYYY-MM-DD HH:mm:ss Z') : null); @@ -209,16 +208,18 @@ export function InputDateTimePicker({value, onChange, readonly, controlProps, .. + {...props}/> ); } else if (controlProps && controlProps.pickerType === 'Time') { + return ( + {...props}/> + ); } return ( @@ -242,7 +243,9 @@ export function InputDateTimePicker({value, onChange, readonly, controlProps, .. InputDateTimePicker.propTypes = { value: PropTypes.string, options: PropTypes.object, - onChange: PropTypes.func + onChange: PropTypes.func, + readonly: PropTypes.bool, + controlProps: PropTypes.object, }; export function FormInputDateTimePicker({hasError, required, label, className, helpMessage, testcid, ...props}) {