react-datepicker icon indicating copy to clipboard operation
react-datepicker copied to clipboard

fix: remove extraneous state update

Open dchandc opened this issue 3 years ago • 1 comments

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

dchandc avatar Jun 21 '22 22:06 dchandc

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.

stale[bot] avatar Sep 21 '22 02:09 stale[bot]