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

primeng calendar year view not work with *maxDate* and *minDate* not working #12583

Closed
ashikjs opened this issue Jan 31, 2023 · 2 comments · Fixed by #12154
Closed

primeng calendar year view not work with *maxDate* and *minDate* not working #12583

ashikjs opened this issue Jan 31, 2023 · 2 comments · Fixed by #12154
Labels
LTS-PORTABLE Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@ashikjs
Copy link
Contributor

ashikjs commented Jan 31, 2023

Describe the bug

image

It's my code use

`

currentDate: Date = new Date()

<p-calendar formControlName="date"
             appendTo="body" view="year" dateFormat="yy"
             [minDate]="currentDate"
 ></p-calendar>
And 
<p-calendar formControlName="date"
             appendTo="body" view="year" dateFormat="yy"

             [maxDate]="currentDate"
 ></p-calendar>

`

Anyone of those date not disable those previous or future date but if user click future date then it automatic select current years.

Environment

Angular 15.0.4
primeng: ^15.0.1

Reproducer

No response

Angular version

15.0.4

PrimeNG version

15.0.1

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

v18.13.0

Browser(s)

Chorme, firfox

Steps to reproduce the behavior

No response

Expected behavior

It should be disable future date if i set maxDate current date and it should be disable previous date if i set minDate current Date

@JohannesPertl
Copy link

Any updates with this issue? It's an annoying bug and should be an easy fix

@mertsincan mertsincan 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 Aug 18, 2023
@mertsincan mertsincan modified the milestone: 16.2.1 Aug 18, 2023
@mertsincan
Copy link
Member

Hi @JohannesPertl,

Could you please try the fix at #12154? If ok for you, I'll merge it asap after it is updated.

Best Regards,

@mertsincan mertsincan added this to the 16.2.1 milestone Aug 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTS-PORTABLE Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
4 participants