After solving some problems, I continued to send DatePicker data to my form. In my form, I mainly use elements from redux-form-material-ui, but DatePicker is not part of it.
I found 2 ways to create a DatePicker component with a redux form.
<Field
name="startDate"
autoOk={true}
floatingLabelText="startDate"
component={(startDate) => {
return <DatePicker {...startDate} />;
}}
onChange={(event, date) => {console.log(date);}}
/>
and
<DatePicker
name="startDate"
autoOk={true}
floatingLabelText="startDate"
onChange={(event, date) => {console.log(date)}} />
The problem is that I don’t know how to update form data using it. The first example does not even show the selected date in the text box. In the store, form.myFormI see that I made the date field active, but it never updates with the selected date. The second shows the selected date, but it is not part of the object form.myForm...
(, https://github.com/erikras/redux-form/issues/364), fields, this.props.fields.startDate.onChange.
, redux-form material-ui, . , , onChange, . , , - , .
"react": "15.1.0",
"react-tap-event-plugin": "1.0.0",
"redux": "3.0.5",
"redux-form": "^6.0.0-alpha.4",
"redux-form-material-ui": "^2.0.0",