You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Mark Lundquist <ml...@wrinkledog.com> on 2004/03/24 19:32:30 UTC

[cforms] Formatting of date widget?

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...)

thx,
~ mark

Re: [cforms] Formatting of date widget?

Posted by Mark Lundquist <ml...@wrinkledog.com>.
On Mar 24, 2004, at 10:41 AM, Joerg Heinicke wrote:

> On 24.03.2004 19:32, Mark Lundquist wrote:
>
>> <..snip..>

> 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)?
>

Perfect, thanks Joerg... (I  guess it's time to make another pass 
through the samples now that I understand some of this stuff and see 
what else I might have missed :-)

~ mark



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


Re: [cforms] Formatting of date widget?

Posted by Joerg Heinicke <jo...@gmx.de>.
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