y0c / react-datepicker

📅 React DatePicker Library (Flexible, Reusable)
https://y0c.github.io/react-datepicker
MIT License
168 stars 32 forks source link

RangeDatePicker Input blur does not call onChange #43

Open pothos-dev opened 4 years ago

pothos-dev commented 4 years ago

With a RangeDatePicker, writing a formatted date into the Input Fields will update the internal state of the component, but will not notify listeners via the onChange prop, making it impossible to change the observed date range without clicking into the Calendar widget.

This should easily be fixed by calling onChange in handleInputBlur or handleInputChange.