Skip to content

Commit

Permalink
fix: reflect changed year when selecting date in month view (primefac…
Browse files Browse the repository at this point in the history
…es#7257)

* fix: show current year when select year in month view

* fix: show prev, currentYear at month view when numberOfMonths mode
  • Loading branch information
KumJungMin authored Sep 26, 2024
1 parent 26a83fb commit 92de1eb
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 @@ -3342,7 +3342,7 @@ export const Calendar = React.memo(
const createTitleYearElement = (metaYear) => {
const viewDate = getViewDate();
const viewYear = viewDate.getFullYear();
const displayYear = props.numberOfMonths > 1 ? metaYear : viewYear;
const displayYear = props.numberOfMonths > 1 || props.yearNavigator ? metaYear : currentYear;

if (props.yearNavigator) {
let yearOptions = [];
Expand Down

0 comments on commit 92de1eb

Please sign in to comment.