I am using react-datepicker in my project. The required format is mm/dd/yyyy. What I want is ,if I want to type a date it,should be in date format.
Eg: I want the date 21st Jan 1980. When I pick from the datepicker it is in the correct format(01/21/1980).
Now if I type the same date it's not auto inserting slash in between ,but showing the date like 01211980.
<div className="dashboard-patients-details_row_value">
<Field name="DateRec" component={Datepicker} disabled={isEditing?false:true}/>
</div>
<div className="datepicker">
<DatePicker
selected={value ? moment(value) : null}
onChange={onChange}
disabled={disabled}
/>
<div className="calendar-block">
<CalendarIcon onClick={this.datepicker}
/>
</div>
</div>
How to solve this issue?