Skip to content

Commit

Permalink
Add check for year to not go over maxDate (#3490)
Browse files Browse the repository at this point in the history
Co-authored-by: Cosmin Simon <[email protected]>
  • Loading branch information
flashcrow2000 and Cosmin Simon authored Oct 20, 2022
1 parent bd2a1ff commit 0d458a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/lib/calendar/Calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -3200,7 +3200,7 @@ export const Calendar = React.memo(
<div className="p-yearpicker">
{yearPickerValues().map((y, i) => {
return (
<span onClick={(event) => onYearSelect(event, y)} key={`year${i + 1}`} className={classNames('p-yearpicker-year', { 'p-highlight': isYearSelected(y) })}>
<span onClick={(event) => onYearSelect(event, y)} key={`year${i + 1}`} className={classNames('p-yearpicker-year', { 'p-highlight': isYearSelected(y), 'p-disabled': !isSelectable(0, 0, y) })}>
{y}
</span>
);
Expand Down

0 comments on commit 0d458a1

Please sign in to comment.