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

p-calendar: validation is triggered before calendar is even touched #14542

Closed
martinkasa opened this issue Jan 12, 2024 · 1 comment · Fixed by #14627
Closed

p-calendar: validation is triggered before calendar is even touched #14542

martinkasa opened this issue Jan 12, 2024 · 1 comment · Fixed by #14627
Assignees
Labels
LTS-PORTABLE Issue's fix will be ported to supported LTS versions Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@martinkasa
Copy link

Describe the bug

When required="true" and dataType="string", calendar component changes property bound by ngModel and incorrectly set it to null probably. Consequence is also that control is marked as dirty and therefore if it is required, it is immediately highlighted with red as invalid.

Check stackblitz example: https://stackblitz.com/edit/tkapjd?file=src%2Fapp%2Fdemo%2Fcalendar-reactive-forms-demo.ts

image

Environment

angular 17 app on Windows

Reproducer

https://stackblitz.com/edit/tkapjd?file=src%2Fapp%2Fdemo%2Fcalendar-reactive-forms-demo.ts

Angular version

17

PrimeNG version

17.3.2

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

18

Browser(s)

all

Steps to reproduce the behavior

No response

Expected behavior

No response

@martinkasa martinkasa added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jan 12, 2024
@mertsincan
Copy link
Member

Thanks a lot for your report! I added a milestone for it. We'll check it before the milestone is released. Thanks a lot for your understanding!

@mertsincan mertsincan added Status: Pending Review Issue or pull request is being reviewed 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 Jan 15, 2024
@mertsincan mertsincan added this to the 17.4.0 milestone Jan 15, 2024
@cetincakiroglu cetincakiroglu self-assigned this Jan 23, 2024
@cetincakiroglu cetincakiroglu modified the milestones: 17.4.0, 17.5.0 Jan 24, 2024
@mehmetcetin01140 mehmetcetin01140 self-assigned this Jan 25, 2024
@cetincakiroglu cetincakiroglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working LTS-PORTABLE Issue's fix will be ported to supported LTS versions and removed Status: Pending Review Issue or pull request is being reviewed by Core Team labels Feb 1, 2024
cetincakiroglu added a commit that referenced this issue Feb 1, 2024
Fixed #14542 - Calendar  | Validation is triggered before calendar is…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTS-PORTABLE Issue's fix will be ported to supported LTS versions Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants