Open HeneryHawk opened 1 year ago
Support for using a proper date format string (ISO 8601) like the rest of the development world should be fixed, especially since using a proper format (for instance when passed over an api) doesn't throw an error, it just happily displays a broken string (take the most common format globally of yyyy-MM-dd that shows the full year twice for example).
A simple solution could be to add a parameter to toggle the format if you are worried that fixing it would break legacy sites.
Describe the bug
The default value of the property
dateFormat
ismm/dd/yy
where the year is defined with only twoy
. So when the year is specified withyyyy
the year is printed two times.mm/dd/yy
-> 04/25/2023mm/dd/yyyy
-> 04/25/20232023This is very confusing because normally the full year is defined per
yyyy
andyy
defines only the two digit century. As far as i know this is also defined in ISO 8601.But unfortunately the PrimeNg Calendar defines here a different format.
Environment
Angular app with latest version of PrimeNg
Reproducer
https://stackblitz.com/edit/github-jqek2c?embed=1&file=src/app/app.component.html
Angular version
14.2.12
PrimeNG version
15.4.1
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
18.16.0
Browser(s)
No response
Steps to reproduce the behavior
No response
Expected behavior
No response