I'm submitting a ... (check one with "x")
[ x] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35
Current behavior
using primeng 4.1.3
Calendar component is marked as invalid even with valid date.
Minimal reproduction of the problem with instructions
1掳 Go to the official page to test this : https://www.primefaces.org/primeng/#/calendar
2掳 Select a date with mouse in the visual date selector (of the basic component for example).
3掳 Manually remove the last number (ex: "08/23/2017" --> "08/23/201") and then manually type the last digit again to have a full valid date again (ex: "08/23/2017"). Inspecting the calendar element shows that it's class switch from "ng-valid" to "ng-invalid" ( final result :
This is a new bug since 4.1.3. Before, it worked well, I changed back to V4.1.2.
I can verify that we're seeing this as well.
I am also seeing this.
We have the same issue. Switched back to v4.1.2.
This has been an issue for a few versions now. for anyone in a bind this is how we've been getting around it. Would really like to have this fixed though.
this.form.get('yourDate').valueChanges.subscribe(() => {
setTimeout(() => { this.form.get('yourDate').updateValueAndValidity({ emitEvent: false }); })
});
I have the same issue, can't use 4.1.3 that way
I had the issue with 4.1.3.
The issue seems to be fixed in 4.2.1.
Yes, same conclusion here.
I'm using PrimeNG version 6.1.3, and this is still happening when using reactive forms.
Using date format: "MM d, yy" with "[showTime] = true".
Most helpful comment
This has been an issue for a few versions now. for anyone in a bind this is how we've been getting around it. Would really like to have this fixed though.