Date input - saved format

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

Date input - saved format

inanda.menezes
This post was updated on .
Hi,

Is there any easy way to change the saved date format?


It's pretty easy to change the format shown to the user:
<property as="xs:string"  name="oxf.xforms.format.input.date"  value="[D].[M].[Y]"/>

But I couldn't find any property to change the saved format.


 
Reply | Threaded
Open this post in threaded view
|

Re: Date input - saved format

Alessandro  Vernet
Administrator
Hi Inanda,

No: by design, dates are always saved in the ISO format. If you really need to have the date stored in another form (but, really, do you?), then you could create another hidden control, with a calculated value that "formats" the date in format you need.

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Date input - saved format

inanda.menezes
This post was updated on .
Hi Alessandro,

Thanks, it was just to confirm that there isn't a property to configure it.
I would need a different format, because in the beginning of the project the customer did not want the Date component with a calendar in the form. So we used a normal input field which validates the format dd.mm.yyyy, but now  they were thinking about change it to use the Date component with Calendar. So we would need to use this component and keep the dd.mm.yyyy format in database, but as it does not have a quick property to configure it, maybe it will not be priority for now.