Calendar error on click of the years menu for selectionMode="range"-> cannot read properties of undefined (reading 'getFullYear' ) #14881
Labels
Resolution: Cannot Replicate
Issue could not be replicated by Core Team
Resolution: Stale
Issue or pull request is inactivity and unfortunately it will be *closed* if there is no response
Describe the bug
I have the following code in my html file:
<p-calendar dateFormat="dd.mm.yy"
#calendar
formControlName="dateRange"
selectionMode="range"
[readonlyInput]="true"
[minDate]="minStartDate"
[maxDate]="maxDate">
When I haven't selected any dates from the calendar and I click on the years menu I get the following error in the console:
and the calendar looks like this:
If I have selected one date and then I click on the years menu it works just fine.
However this issue is only for the calendar in the 'range' selection mode.
Thanks in regards!
Environment
web env
Angular version
16.2.12
PrimeNG version
16.9.1
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
v18.17.0
Browser(s)
Chrome
The text was updated successfully, but these errors were encountered: