cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <joerg.heini...@gmx.de>
Subject Re: [cforms] Formatting of date widget?
Date Wed, 24 Mar 2004 18:41:38 GMT
On 24.03.2004 19:32, Mark Lundquist wrote:

> I have a
> 
>     <fd:widget id="x">
>         <fd:datatype base="date" />
>     </fd:widget>
> 
> and this in the Forms template
> 
>     <ft:widget id="x">
>         <ft:styling type="output"/>
>     </ft:widget>
> 
> How can I control the formatting of the date, a la <jx:formatDate 
> pattern="...">?
> 
> (I could just use that, on "${x.value}", but stylistically I'd rather 
> stick w/ <ft:widget> like everything else in this template if there's a 
> way...)

What about

<fd:datatype base="date">
   <fd:convertor>
     <fd:patterns>
       <fd:pattern>dd/MM/yyyy</fd:pattern>
       <!-- The above pattern is a non-locale-specific pattern. You can
            also add locale-specific patterns by adding more fd:pattern
            elements here, with a locale attribute on them. -->
     </fd:patterns>
   </fd:convertor>
</fd:datatype>

(taken from sample form1.xml)?

Joerg

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message