-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Good afternoon,
I am using ZK version 9.5.0.3
with JAVA 11. Using the DateBox with the locale of en_GB and a format of DateFormat.SHORT
or the official dd/MM/y
. According to this website, the date should be displayed as 12/01/2022, however the generated date is 12/01/22.
I created a ZK Fiddle https://zkfiddle.org/sample/oirisd/1-Datebox-en-GB-issue. While testing I also checked and on version 9.6.1
the official format works. Considering that I cannot easily update to zk 9.6.1, what could I do to fix this issue?
Because DateFormat.SHORT
change between java 8 and 9, it's better to specify an explicit format : format="dd/MM/yyyy
This format both shows 4 digits of the year in 9.5.0.3 and 9.6.1.
JDK 8 uses JRE as the default locale provider, whereas in JDK 9 onwards CLDR is the default locale provider. (see JEP 252: Use CLDR Locale Data by Default) Because of the change of the default locale provider, the built-in date formats (e.g. DateFormat.SHORT
) stand for different formats after JDK 9.
You can use old data format by running JVM with the option:
-Djava.locale.providers=JRE,CLDR
Asked: 2022-02-11 22:38:31 +0800
Seen: 11 times
Last updated: Feb 21 '22
bug with intboxes on mobile devices
zk keikai-how to add custom button/label to formulabar?
zk-keikai- update multiple cells parallel at same time asynchronously
zk-keikai-How to auto fit column width based on text
zk-keikai-ClipboardPateEvent-called twice
Reference a spring bean from VariableResolver