react-datepicker: Function bound to onChange receives wrong date
When I select 2015-11-01 the function bound to onChange event gives me “2015-10-31T22:00:00.000Z”.
Code used:
<DatePicker
selected={this.state.startedReading}
dateFormat="DD.MM.YYYY"
onChange={::this.handleStartedReadingChange}
/>
I’m using 0.15.2.
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 25 (10 by maintainers)
Sorry, no. I switched to jQuery datepicker 😦
Apparently setting a proper utc value in constructor “fixed” this. However, I don’t want to use a default date.