I’m having trouble getting date formatting to work when the field is read-only.
I've configured it in the ds.xml file...
I've tried setting the format in Java on the date, and on the form...
It gets rendered like this...
Some Date: Apr 1 2018
I want it to get formatted like this...
Some Date: 2018/04/01
I've tried all sorts of variations using datetime, text, StaticTextItem etc. but they all have issues. The above is the closest to what I think it should be.
Any ideas?
Thanks!
-Chris
SmartClient Version: v11.0p_2016-08-09/Enterprise Deployment (built 2016-08-09)
FireFox 24.x ... yeah, I know it's ancient but that's the target.
I've configured it in the ds.xml file...
Code:
<field name="some_date" title="Some Date" type="date" canEdit="false" readOnlyDisplay="static" dateFormatter="TOJAPANSHORTDATE"/>
I've tried setting the format in Java on the date, and on the form...
Code:
form.getField("some_date").setDateFormatter(DateDisplayFormat.TOJAPANSHORTDATE);
Code:
form.setDateFormatter(DateDisplayFormat.TOJAPANSHORTDATE);
Some Date: Apr 1 2018
I want it to get formatted like this...
Some Date: 2018/04/01
I've tried all sorts of variations using datetime, text, StaticTextItem etc. but they all have issues. The above is the closest to what I think it should be.
Any ideas?
Thanks!
-Chris
SmartClient Version: v11.0p_2016-08-09/Enterprise Deployment (built 2016-08-09)
FireFox 24.x ... yeah, I know it's ancient but that's the target.
Comment