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

Component: Calendar Year picker #14233

Closed
bkindzierski opened this issue Nov 28, 2023 · 2 comments
Closed

Component: Calendar Year picker #14233

bkindzierski opened this issue Nov 28, 2023 · 2 comments
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working v18-port
Milestone

Comments

@bkindzierski
Copy link

bkindzierski commented Nov 28, 2023

Describe the bug

When adding a p-calendar using a formControlName and using the "year" view, the component does not display the years. and receives the following error:

ERROR TypeError: Y.getFullYear is not a function
at an.isYearSelected (calendar.ts:1680:56)
my example:

Environment

I am seeing this when running ng serve on localhost

Reproducer

No response

Angular version

17

PrimeNG version

16.0.2

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

20.9.0

Browser(s)

chrome

Steps to reproduce the behavior

Add the example code from primeng website version 17 beta to form using a formControlName instead of [(ngModel])

Expected behavior

No response

@bkindzierski bkindzierski added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Nov 28, 2023
@mgecmez
Copy link

mgecmez commented Feb 20, 2024

I have a similar problem. Because, for example, I tried to set the year 2024 to the calendar and it gave this error.

@tindezeeuw
Copy link
Contributor

We have the same problem with a calendar in the range selection mode.
The problem is in the isYearSelected(year: number) function of the calendar.ts. I will open a PR for this

tindezeeuw added a commit to tindezeeuw/primeng that referenced this issue Aug 28, 2024
change isYearSelected function so it doesn't break when no date(s) is selected yet
@cetincakiroglu cetincakiroglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Sep 26, 2024
@cetincakiroglu cetincakiroglu added this to the 17.18.11 milestone Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working v18-port
Projects
None yet
Development

No branches or pull requests

5 participants