Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calendar error on click of the years menu for selectionMode="range"-> cannot read properties of undefined (reading 'getFullYear' ) #14881

Closed
AntoninaY01 opened this issue Feb 26, 2024 · 4 comments
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

Comments

@AntoninaY01
Copy link

AntoninaY01 commented Feb 26, 2024

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:
Screenshot 2024-02-26 at 18 00 39

and the calendar looks like this:
Screenshot 2024-02-26 at 17 50 25

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

@AntoninaY01 AntoninaY01 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Feb 26, 2024
@mehmetcetin01140 mehmetcetin01140 added Resolution: Cannot Replicate Issue could not be replicated by Core Team and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Feb 27, 2024
Copy link

We're unable to replicate your issue, if you are able to create a reproducer by using PrimeNG Issue Template or add details please edit this issue. This issue will be closed if no activities in 20 days.

@demogorgon2222
Copy link

It happens if you initialize the control with empty array. It works fine if you initialize it with a null:
https://stackblitz.com/edit/github-xrcxa9

Copy link

This issue has been automatically marked as stale. If this issue is still affecting you with the latest version, please leave any comment, and we will keep it open. We are sorry that we have not been able to prioritize it yet. If you have any new additional information, please include it with your comment!

@github-actions github-actions bot added the Resolution: Stale Issue or pull request is inactivity and unfortunately it will be *closed* if there is no response label Aug 23, 2024
Copy link

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you for your understanding!

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

3 participants