Hi list, I would like to change the default date
format of an input element bind to an xsd:date type (eg. Tuesday August 14, 2007). In the documentation, a format attribute exist for
the output elements : xxforms:format="format-date(xs:date(.), '[FNn], le [D]
[MNn] [Y]', 'fr', (), ())" Is there any equivalent for an input element ? <xforms:input
ref="Referentiels/Parametre/DateCreationParametre" format="format-date(xs:date(.),
'[FNn], le [D] [MNn] [Y]', 'fr', (), ())"> If not, how to display another date type for an input
for date type ? Thanks a lot for your
help. Francois -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Hi François-Xavier,
> In the documentation, a format attribute exist for the output elements : > > xxforms:format="format-date(xs:date(.), '[FNn], le [D] [MNn] [Y]', 'fr', > (), ())" > > Is there any equivalent for an input element ? Yes, you can use xxforms:format for date input, too: http://www.orbeon.com/ops/doc/reference-xforms-2#d3e192 AFAIK there's aready a date format defined in the properties.xml file. So it should be sufficient to bind the date type to the node to get a formatted date input. There's also an example in the XForms Sandbox: http://www.orbeon.com/ops/xforms-sandbox/ Select the "Test Samples", then the "date" sample. HTH florian -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
Florian Schmitt wrote:
> Hi François-Xavier, > >> In the documentation, a format attribute exist for the output elements : >> >> xxforms:format="format-date(xs:date(.), '[FNn], le [D] [MNn] [Y]', 'fr', >> (), ())" >> >> Is there any equivalent for an input element ? > > Yes, you can use xxforms:format for date input, too: > http://www.orbeon.com/ops/doc/reference-xforms-2#d3e192 > > AFAIK there's aready a date format defined in the properties.xml file. > So it should be sufficient to bind the date type to the node to get a > formatted date input. > > There's also an example in the XForms Sandbox: > http://www.orbeon.com/ops/xforms-sandbox/ > Select the "Test Samples", then the "date" sample. *displaying* the selected date next to the calendar picker. I understand that this is what you want. -Erik -- Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Thanks a lot, it works fine.
<xforms:input ref="Referentiels/Methode/DateCreationMethode" xxforms:format="if (. castable as xs:date) then format-date(xs:date(.), '[FNn] [D] [Mn] [Y]', 'fr',(), ()) else ."> <xforms:label class="MET-label"> <xforms:output value="instance('ressources-instance')//skos:concept[@name='DateCreationMethode']/skos:prefLabel"/> </xforms:label> <xforms:help ref="instance('ressources-instance')//skos:concept[@name='DateCreationMethode']/skos:definition"/> </xforms:input> Alex (working with francois) -----Message d'origine----- De : Erik Bruchez [mailto:[hidden email]] De la part de Erik Bruchez Envoyé : lundi 3 septembre 2007 23:40 À : [hidden email] Objet : Re: [ops-users] Input / type date / format Florian Schmitt wrote: > Hi François-Xavier, > >> In the documentation, a format attribute exist for the output elements : >> >> xxforms:format="format-date(xs:date(.), '[FNn], le [D] [MNn] [Y]', 'fr', >> (), ())" >> >> Is there any equivalent for an input element ? > > Yes, you can use xxforms:format for date input, too: > http://www.orbeon.com/ops/doc/reference-xforms-2#d3e192 > > AFAIK there's aready a date format defined in the properties.xml file. > So it should be sufficient to bind the date type to the node to get a > formatted date input. > > There's also an example in the XForms Sandbox: > http://www.orbeon.com/ops/xforms-sandbox/ > Select the "Test Samples", then the "date" sample. *displaying* the selected date next to the calendar picker. I understand that this is what you want. -Erik -- Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Free forum by Nabble | Edit this page |