-
Bug
-
Resolution: Fixed
-
Normal
-
8.0.3
-
Security Level: Jimmy
-
ZK 8.0.4 S1
-
None
Steps to Reproduce
<datebox showTodayLink="true" format="dd/MM/yyyy HH:mm"/>
open the datebox dropdown
Actual Result
the date of the today link is formatted including the ":" at the end
Expected Result
only display the date
Root Cause
these 2 methods attempt to perform the splitting between date and time format
https://github.com/zkoss/zk/blob/master/zul/src/archive/web/js/zul/db/Datebox.js#L300
https://github.com/zkoss/zk/blob/master/zul/src/archive/web/js/zul/db/Datebox.js#L332
I don't think all possible date format strings can be split in a reliable way.
It should be possible to define a date and time format separately if the default mechanism fails.
Workaround
Override the getDateFormat and getTimeFormat JS functions to return the expected value
The attachment datebox-today-label.zul shows 2 alternatives
- splitting by space (where applicable)
- define a custom dateFormat using a widget attribute