p-calendar: validation is triggered before calendar is even touched #14542
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
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
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
The text was updated successfully, but these errors were encountered: