import * as React from 'react' ; import { useFormSetValue } from 'relay-forms' ; export type InputDateFieldType = Date | undefined ; export const InputDateField = ( { fieldKey } ) => { const [ , setValue ] = useFormSetValue < InputDateFieldType > ( { key : fieldKey , initialValue : undefined , } ) ; return ( < div className = "form-group" > < label > Input File < /label> < input type = "date" onChange = { ( e ) => { setValue ( e . target . valueAsDate ? e . target . valueAsDate : undefined ) ; } } /> ; < /div>); } ;