-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
qburst/react-datepicker-3
#48Description
Describe the bug
When using selectsMultiple along with showYearPicker, when I select various years they are not getting the selected class and therefore not able to style as selected.
To Reproduce
const MultiYearPicker = () => {
const [selectedDates, setSelectedDates] = useState([]);
return (
<DatePicker
placeholder="Select years"
dateFormat="yyyy"
showYearPicker
selectsMultiple
selectedDates={selectedDates}
onChange={setSelectedDates}
shouldCloseOnSelect={false}
disabledKeyboardNavigation
/>
);
};- When I select years, say 2019 and 2024
- These years are added to state and I see the dates in the input
- But those year divs do not get the
react-datepicker__year-text--selectedclasses so they remain unstyled.
(This may be issue with othershow_Pickervariations, butshowYearPickeris what I've tested.
Expected behavior
I expect the selected class being applied.
Screenshots
Screen.Recording.2025-01-15.at.10.16.00.AM.mov
Desktop (please complete the following information):
- OS: macOS
- Browser: chrome
- Version 131
UsaidAqeel
Metadata
Metadata
Assignees
Labels
No labels