Working on a sample reactjs form.
It has two date fields, startdate
and enddate
as shown below
<input type="text" name="startdate" value={this.state.startDate}/>
<input type="text" name="enddate" value={this.state.endDate}/>
these two fields should allow date, only in "dd/mm/yyyy" format and should not allow any other characters expect valid date, month, year and "/".
How to allow only the valid characters as mentioned above using javascript?