In any case I get exception Could not parse date
.
There is unified company standard of date format - 'dd/MM/yyyy'
There are computers with different system locales. I am using jQueryUI for datepicker
( it is standard for widgets and already settled css styles to match application theme).
At the beginning, I didn't found better solution then manually convert date string to date object using SimpleDateFormat
object. Now I have converter class but still need to configure every Action that has java.util.Date
property.
I am using XML configuration and I did try to add into struts.xml
:
<constant name="struts.date.format" value="dd/MM/yyyy" />
It didn't work.
Is there anything that can force all web-application to use single date format without locales just a unified format for output and input date?
Or the way how I can extract date format expected by Struts date type converter, so I can use JS to convert date before to be sent to server to match Struts expectations?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…