Skip to content

Commit

Permalink
Fix #3967: Calendar year must check first and last day of year (#3968)
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware authored Jan 22, 2023
1 parent 8d60806 commit 7d0fd42
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion components/lib/calendar/Calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -3236,7 +3236,11 @@ 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), 'p-disabled': !isSelectable(0, 0, 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) || isSelectable(30, 11, y)) })}
>
{y}
</span>
);
Expand Down

0 comments on commit 7d0fd42

Please sign in to comment.