react-datepicker
react-datepicker copied to clipboard
fix: remove extraneous state update
This PR addresses issue #3674.
The onMonthClick handler already sets the proper value for the preSelection date to the one navigated to via keyboard. The extraneous line updates preSelection again, but to an incorrect date that lags behind the intended date due to its reliance on this.props.selected. Without this change, keyboard navigation only works every other date selection.
https://user-images.githubusercontent.com/2702149/174904494-2321efbd-8909-4564-88a0-be60ab05e394.mov
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.