-
Notifications
You must be signed in to change notification settings - Fork 359
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
Wrong date parsed on angular with german locale #2244
Comments
Hi @wuedev , thanks for reporting this issue. As you specified just v3 for the version, are you using 3.0.0 or a later one? |
Versions are: angular/core: ~12.2.0 jsonforms/core: 3.1.0 |
I was using v12 of angular because this is what's used in the angular seed and I'm not sure which version is supported officially. But from browsing issues it seems that now at least angular v15 should be supported, is that correct? Awesome project, btw! |
Hi @wuedev , the latest pre-release version |
Hi Lucas, i've tried 3.2.0-beta.0, the problem remains. I'm using the DateAdapter like this in app.component.ts:
Any tips what I could do? Unfortunately I'm still very new to angular... |
Hi Lucas, what do I have to do to get a correct datepicker for the German locale/date format? What am I missing? This should be possible, and it shouldn't be so hard. Any tips are welcome, thanks for your help. |
Hi @wuedev ,
|
Describe the bug
Using the angular seed with a german locale, a date typed in a date field is not parsed correctly.
Expected behavior
A date like '1.10.2010' should be accepted as is.
Steps to reproduce the issue
I have set up a simple form based on the angular seed. Locale is set to "de-DE". The datepicker displays german labels for months etc. and the selected date is displayed in the correct german format (1.10.2010).
However, typing a date directly into the date field doesen't work as expected - entering '1.10.2010' and pressing enter the date is changed to '9.1.2010. It appears that the months is decreased by one and then month and day are exchanged, so it seems that the original american date format (MM.DD.YYYY) is used for parsing. I have set an option "dateFormat" on the date control in uischema.json, which has no effect.
Screenshots
No response
Which Version of JSON Forms are you using?
v3.1.0
Framework
Angular
RendererSet
Material
Additional context
No response
The text was updated successfully, but these errors were encountered: