From 0d458a18ab447b3811da5e209258efab69907832 Mon Sep 17 00:00:00 2001 From: flashcrow2000 Date: Thu, 20 Oct 2022 16:00:21 +0300 Subject: [PATCH] Add check for year to not go over maxDate (#3490) Co-authored-by: Cosmin Simon --- components/lib/calendar/Calendar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/lib/calendar/Calendar.js b/components/lib/calendar/Calendar.js index fcd478f1bb..5be0e675a2 100644 --- a/components/lib/calendar/Calendar.js +++ b/components/lib/calendar/Calendar.js @@ -3200,7 +3200,7 @@ export const Calendar = React.memo(
{yearPickerValues().map((y, i) => { return ( - onYearSelect(event, y)} key={`year${i + 1}`} className={classNames('p-yearpicker-year', { 'p-highlight': isYearSelected(y) })}> + onYearSelect(event, y)} key={`year${i + 1}`} className={classNames('p-yearpicker-year', { 'p-highlight': isYearSelected(y), 'p-disabled': !isSelectable(0, 0, y) })}> {y} );