Skip to content

Commit

Permalink
Merge pull request #5247 from titivermeesch/fix/year-picker-wrong-cla…
Browse files Browse the repository at this point in the history
…ss-attachment

fix: remove wrong class assignment on year wrapper
  • Loading branch information
martijnrusschen authored Dec 1, 2024
2 parents 7a1eb11 + b3e89cc commit 51507a6
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/year.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -407,15 +407,6 @@ export default class Year extends Component<YearProps> {
return y === preSelected && !isPreSelectedYearDisabled ? "0" : "-1";
};

getYearContainerClassNames = () => {
const { selectingDate, selectsStart, selectsEnd, selectsRange } =
this.props;
return clsx("react-datepicker__year", {
"react-datepicker__year--selecting-range":
selectingDate && (selectsStart || selectsEnd || selectsRange),
});
};

getYearContent = (y: number) => {
return this.props.renderYearContent ? this.props.renderYearContent(y) : y;
};
Expand Down Expand Up @@ -475,7 +466,7 @@ export default class Year extends Component<YearProps> {
}

return (
<div className={this.getYearContainerClassNames()}>
<div className="react-datepicker__year">
<div
className="react-datepicker__year-wrapper"
onMouseLeave={
Expand Down

0 comments on commit 51507a6

Please sign in to comment.