Date formatting problems

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Date formatting problems

monuca
Hi,

I encounter a strange formation problem to dates. Here is the context:
we have a lot of dates in the orbeon forms and we formatted them. We choose to formated them from properties-local.xml in the following way:

 <property as="xs:string"  name="oxf.xforms.format.input.date"  value="[D]/[MM]/[Y]"/>
    <property as="xs:string"  name="oxf.xforms.format.output.date"
              value="if (. castable as xs:date) then format-date(xs:date(.), '[D]/[MM]/[Y]', xxforms:lang(), (), ()) else ."/>


Now we are facing a strange problem, sometimes the date shows like:
      1/S/2016 instead of 1/7/2016
      4/T/207 instead of 1/8/2016

If I go the the calendar again and then, without changing the date, go to an other fields the format is back as it is expected.

Does anyone have a clue why is this happening?
Reply | Threaded
Open this post in threaded view
|

Re: Date formatting problems

Erik Bruchez
Administrator
The reason is that only a small, close set of input formats are supported:

    https://github.com/orbeon/orbeon-forms/wiki/XForms-~-Configuration-Properties#for-xfinput

Supporting other formats would be good, but currently there is not support outside of what is explicitly supported.

-Erik