Description
Bug description:
When the YearPicker and MonthPicker are enabled in the react-datepicker component, and a date is already selected, clicking on a month or a year adds the classes react__month-text--keyboard-selected and react-datepicker__year-text--keyboard-selected. However, the classes react-datepicker__year-text--selected and react-datepicker__month-text--selected (or __year-text--range-start, __month-text--range-start in the case of a range) are not removed from the previously selected dates.
Steps to reproduce:
Enable YearPicker and MonthPicker in the react-datepicker component.
Select a date.
Click on a month or a year.
Notice that the old classes react-datepicker__year-text--selected and react-datepicker__month-text--selected do not disappear, and the new classes react__month-text--keyboard-selected and react-datepicker__year-text--keyboard-selected are added.
Expected behavior:
After clicking on a month or a year, the old classes should be removed, and the new classes should be added correctly.