The onChange callback of the react-datepicker
component seems to return the value directly without the event object.
Can you try something like that:
<DatePicker
id="startDate"
type="date"
name="startDate"
className="form-input"
value={date.toString()}
onChange={date => handleChange({ target: { value: date, name: 'startDate' } })}
/>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…