eclipsesource / eclipsesource/jsonforms
Different behaviour on field of type string with format date in array of objects vs object
- Dominant language
- TypeScript
- Stars
- 2.7k
- Forks
- 424
- Avg merge
- 17d 8h
- Merged PRs (30d)
- 1
Description
**Describe the bug**
Given is following schema where one date property is in the root object and another date property is nested inside a list of objects
schema = {
type: "object",
properties: {
validators: {
type: "array",
items: {
type: "object",
properties: {
name: {
type: "string",
title: "Name",
description: "Name"
}
},
required: ["name"]
}
},
currentUserCanValidate: {
title: "Aktueller Benutzer ist validator?",
type: "boolean"
},
validations: {
type: "array",
items: {
type: "object",
properties: {
validationDate: {
title: "**date in array of objects**",
type: "string",
format: "date"
},
validatedBy: {
title: "validiert von",
type: "string"
}
},
required: ["validationDate", "validatedBy"]
}
},
nextValidation: {
type: "string",
title: "**date in object**",
format: "date"
}
}
};
When I use react with material renderer, then I expect, that the formats in UI and the presentation of the DateField is in both cases the same, but it renders different formats:
**To Reproduce**
Copy the schema and render the form.
**Expected behavior**
The date controls schould look the same and not differnt
**Screenshots**

Further questions:
How can i influence the UI Format? I know that the json schema date is per specification in format yyy mm dd... but I guess that the UI can render differently while just storing the date in that format.
Do you have working examples which show how to change the date format in ui?
Contributor guide
Assessment
This issue has not been assessed yet.