Skip to content

Commit

Permalink
Fix primfaces #4730: Calendar: input field cannot parse year-only for…
Browse files Browse the repository at this point in the history
…mat (#4732)

Co-authored-by: akshayantony55 <[email protected]>
  • Loading branch information
akshayaqburst and akshayantony55 authored Aug 3, 2023
1 parent ee2942b commit f8cba94
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions components/lib/calendar/Calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -2373,6 +2373,11 @@ export const Calendar = React.memo(
day = 1;
}

if (props.view === 'year') {
day = 1;
month = 1;
}

const { dayNamesShort, dayNames, monthNamesShort, monthNames } = localeOptions(props.locale);

for (iFormat = 0; iFormat < format.length; iFormat++) {
Expand Down

0 comments on commit f8cba94

Please sign in to comment.