Connecting react-dates' DateRangePicker when 'onChange' combines multiple fields?
See original GitHub issueHas anyone successfully made an integration with react-dates’ DateRangePicker
?
I’m confused about how to handle their onDatesChange
and onFocusChange
because they have two values each (the DateRangePicker
).
Looking at https://github.com/airbnb/react-dates/blob/26ced4d2227af948d2d1801081d3f567c33e87be/src/components/DateRangePickerInput.jsx, they do hook up the onChange
property of each individual field. But I cannot figure out how to combine the “parent” DateRangePicker
with redux-form.
Issue Analytics
- State:
- Created 7 years ago
- Comments:27
Top Results From Across the Web
Handling multiple date-ranges in a single parent · Issue #144
I'm using react-dates in an advanced search component that incorporates multiple date-range fields. I'm trying to figure out the best way to ...
Read more >react | redux-form | material-ui | how to combine DatePicker ...
I used react-datepicker with redux form. The key was to set "selected" property correctly. const selectedDate = this.props.fields.date.value ...
Read more >Multi date picker js
React Datepicker Example The react-datepicker package offers easy customization and allows you to add Date and time through an HTML input field.
Read more >Unit Testing in React: Full Guide on Jest and Enzyme Testing
DateInput component uses library react-datepicker, with two utilities: valueToDate (converts value to date) and dateToValue is vice versa, ...
Read more >React Date Picker | Data Visualization Tools
The Date Picker component allows users to use a drop-down calendar UI allowing the intuitive selection of a day, month and year. This...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
For redux-form 6.8.0 and react-dates 12.2.4, I was having the same problem, none of the solutions worked great for me. Here is what I came up. There are a couple of issues to make this work:
and here is the call using it:
For a single field it is more straight forward:
Here is very simple solution as well :