Closed alexbudarov closed 5 months ago
Example forum topics with invalid strings:
timeFormat = hh:mm a
DateTimeParseException: Text ‘02:03 A’ could not be parsed at index 6
https://www.cuba-platform.com/discuss/t/datetime-patterns/10168
dateTimeFormat = MM/dd/yyyy hh:mm aa
java.lang.IllegalArgumentException: Too many pattern letters: a
https://www.cuba-platform.ru/discuss/t/oshibka-entity-inspector-dlya-sushhnosti-s-date/3797
dateTimeFormat=yyyy-MM-dd HH:mm, EE
When we have logic for runtime validation, we will be able to include it to Studio also.
Often users modify data format strings in such a way that backoffice-ui components can't use them.
But developer gets a warning very late in the running application - only when the string is used by the component (e.g. by dateField).
Example project attached. moifr.zip
I modified:
So we have two problems:
Suggestion Validate data format strings on project start. What to check:
If such formats as above are acceptable - then we should improve DateField to consume formats as presented above.