diff --git a/packages/react-component-library/src/components/DatePickerE/DatePickerE.test.tsx b/packages/react-component-library/src/components/DatePickerE/DatePickerE.test.tsx index 3d995e692b..918ae689b9 100644 --- a/packages/react-component-library/src/components/DatePickerE/DatePickerE.test.tsx +++ b/packages/react-component-library/src/components/DatePickerE/DatePickerE.test.tsx @@ -1062,6 +1062,15 @@ describe('DatePickerE', () => { ) }) + describe('when a startDate and value is specified', () => { + // @ts-ignore + const jsxToRender = + + it('does not throw an error', () => { + expect(() => render(jsxToRender)).not.toThrowError() + }) + }) + describe.skip('when `startDate` and `endDate` are updated externally', () => { beforeEach(() => { const initialProps = { diff --git a/packages/react-component-library/src/components/DatePickerE/DatePickerEInput.tsx b/packages/react-component-library/src/components/DatePickerE/DatePickerEInput.tsx index 1c93624317..ca32caf4b0 100644 --- a/packages/react-component-library/src/components/DatePickerE/DatePickerEInput.tsx +++ b/packages/react-component-library/src/components/DatePickerE/DatePickerEInput.tsx @@ -22,6 +22,7 @@ export interface DatePickerEInputProps extends ComponentWithClass { placeholder: string setHasError: React.Dispatch> to: Date + value?: never } export const DatePickerEInput = forwardRef< @@ -41,6 +42,9 @@ export const DatePickerEInput = forwardRef< onDayChange, onFocus, setHasError, + // Drop value as Formik passes it + // eslint-disable-next-line @typescript-eslint/no-unused-vars + value: _, ...rest }, ref