eclipsesource / eclipsesource/jsonforms

Wrong date parsed on angular with german locale

Open
#2,244 7 comments 0 reactions 0 assignees View on GitHub
angular bug
Dominant language
TypeScript
Stars
2.7k
Forks
424
Avg merge
17d 8h
Merged PRs (30d)
1

Description

### 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_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.