diff --git a/src/test/week_number_test.test.tsx b/src/test/week_number_test.test.tsx index baa704cfa..46f105532 100644 --- a/src/test/week_number_test.test.tsx +++ b/src/test/week_number_test.test.tsx @@ -186,11 +186,6 @@ describe("WeekNumber", () => { ) as HTMLDivElement; expect(weekNumber).not.toBeNull(); - expect( - weekNumber?.classList.contains( - "react-datepicker__week-number--keyboard-selected", - ), - ).toBe(false); expect(weekNumber?.tabIndex).toBe(0); }); @@ -212,11 +207,6 @@ describe("WeekNumber", () => { ".react-datepicker__week-number", ) as HTMLDivElement; expect(weekNumber).not.toBeNull(); - expect( - weekNumber?.classList.contains( - "react-datepicker__week-number--keyboard-selected", - ), - ).toBe(true); expect(weekNumber.tabIndex).toBe(0); }); @@ -267,11 +257,6 @@ describe("WeekNumber", () => { const weekNumber = container.querySelector( ".react-datepicker__week-number", ) as HTMLDivElement; - expect( - weekNumber?.classList.contains( - "react-datepicker__week-number--keyboard-selected", - ), - ).toBe(false); expect(weekNumber.tabIndex).toBe(-1); }); }); @@ -383,59 +368,6 @@ describe("WeekNumber", () => { ), ).toBe(false); }); - - it("should have the class 'react-datepicker__week-number--selected' if selected is not current week and preselected is current week", () => { - const currentWeekNumber = newDate("2023-10-22T13:09:53+02:00"); - const selected = addWeeks(currentWeekNumber, 1); - const { container } = render( - , - ); - const weekNumber = container.querySelector( - ".react-datepicker__week-number", - ); - expect( - weekNumber?.classList.contains( - "react-datepicker__week-number--selected", - ), - ).toBe(false); - expect( - weekNumber?.classList.contains( - "react-datepicker__week-number--keyboard-selected", - ), - ).toBe(true); - }); - - it("should have the class 'react-datepicker__week-number--selected' if selected is not current week and preselected is not current week", () => { - const currentWeekNumber = newDate("2023-10-22T13:09:53+02:00"); - const selected = addWeeks(currentWeekNumber, 1); - const preSelection = addWeeks(currentWeekNumber, 2); - const { container } = render( - , - ); - const weekNumber = container.querySelector( - ".react-datepicker__week-number", - ); - expect( - weekNumber?.classList.contains( - "react-datepicker__week-number--selected", - ), - ).toBe(false); - expect( - weekNumber?.classList.contains( - "react-datepicker__week-number--keyboard-selected", - ), - ).toBe(false); - }); }); }); diff --git a/src/week_number.tsx b/src/week_number.tsx index 0340466ab..e244916e1 100644 --- a/src/week_number.tsx +++ b/src/week_number.tsx @@ -120,8 +120,6 @@ export default class WeekNumber extends Component { "react-datepicker__week-number--clickable": !!onClick, "react-datepicker__week-number--selected": !!onClick && isSameDay(this.props.date, this.props.selected), - "react-datepicker__week-number--keyboard-selected": - this.isKeyboardSelected(), }; return (