diff --git a/src/core_modules/capture-core/components/FormFields/DateAndTime/D2Date/D2Date.component.js b/src/core_modules/capture-core/components/FormFields/DateAndTime/D2Date/D2Date.component.js index 4fac2c1b5b..435b679580 100644 --- a/src/core_modules/capture-core/components/FormFields/DateAndTime/D2Date/D2Date.component.js +++ b/src/core_modules/capture-core/components/FormFields/DateAndTime/D2Date/D2Date.component.js @@ -3,21 +3,21 @@ import * as React from 'react'; import { CalendarInput } from '@dhis2/ui'; type Props = { - label: string, + label?: string, value: ?string, width: number, - calendar: string, + calendar?: string, calendarWidth?: ?number, calendarHeight?: ?number, inputWidth?: ?number, onBlur: (value: string) => void, onFocus?: ?() => void, onDateSelectedFromCalendar?: () => void, - classes: Object, - textFieldRef?: (instance: D2TextField) => void, + classes?: Object, + disabled?: boolean, }; -export class D2Date extends React.Component { +export class D2Date extends React.Component { handleDateSelected: (value: {calendarDateString: string}) => void; constructor(props: Props) { @@ -42,7 +42,6 @@ export class D2Date extends React.Component { onBlur, onFocus, onDateSelectedFromCalendar, - textFieldRef, ...passOnProps } = this.props; @@ -52,13 +51,13 @@ export class D2Date extends React.Component { return (
{ this.containerInstance = containerInstance; }} style={{ width, }} > { onFocus={this.props.onFocus} editable disabled={this.props.disabled} - {...passOnProps} />
);