-
- {
- setLocalTime(!time ? time : (time as unknown as DateTime).toUTC())
-
- // To avoid breaking dates in the parent, we do not pass it unless it's valid
- const formattedDate = !time ? undefined : (time as unknown as DateTime)?.toUTC().toISO()
-
- if ((time as unknown as DateTime)?.isValid || !time) {
- onError && onError(undefined)
- onChange(formattedDate)
- } else {
- onError && onError(TIME_PICKER_ERROR_ENUM.invalid)
- }
- }}
- renderInput={({ inputRef, inputProps }) => {
- return (
-
- )
- }}
- />
-
-
- )
-}
diff --git a/src/components/form/TimePicker/TimePickerField.tsx b/src/components/form/TimePicker/TimePickerField.tsx
deleted file mode 100644
index 124c2241b..000000000
--- a/src/components/form/TimePicker/TimePickerField.tsx
+++ /dev/null
@@ -1,46 +0,0 @@
-import { FormikProps } from 'formik'
-import _get from 'lodash/get'
-import _isEqual from 'lodash/isEqual'
-import { memo } from 'react'
-
-import { TimePicker, TimePickerProps } from './TimePicker'
-
-interface TimePickerFieldFormProps extends Omit