I am trying to use SingleDatePicker in redux-form. Here is the render method in my form
render() {
const {fields: {date}, handleSubmit} = this.props;
return (
<form onSubmit={handleSubmit}>
<div>
<SingleDatePicker
{...date}
id="date_input"
selected={date.value ? moment(date.value, 'DD/MM/YYYY') : moment()}
onChange={param => date.onChange(param)} />
</div>
<button type="submit"><Link to="/Step1">Submit</Link></button>
</form>
);
}
and at the end of this form component
export default reduxForm({
form: 'thisForm',
fields: ['date']})(thisForm);
what I got on the page is a static input like this
when I click it, nothing happened. No highlight, no dropdown calendar like this.
Any idea? Any suggestion to handle datepicker like this in redux-form?
try-> this.state.focused.focused