You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Paul Joseph <pj...@yahoo.com> on 2005/01/14 12:11:17 UTC

is this possible?

Hi,

I am using the CForms date field and the Matt-Kruse
calendar widget that comes along with it.

Is it possible to allow the user to enter the date in
more than one format for a given locale?

ex. 28/02/2005 or Feb 28, 2005 or 280205 and so on? 

I guess I could try to do a regex, but then will run
into I18N issues (I think)

thx!
Paul

=====
This communication, including attachments, is for the exclusive use of 
the addressee and may contain proprietary, confidential, or privileged
information.  If you are not the intended recipient, any use, copying,
disclosure, dissemination, or distribution is strictly prohibited.  If 
you are not the intended recipient, please notify the sender by return mail and delete this communication and destroy all copies.

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


Re: is this possible?

Posted by Stefan Burkard <ne...@burknet.ch>.
have you already tried something like this (more than one pattern for 
the same locale)? i'm just guessing...

<fd:convertor type="formatting">
   <fd:patterns>
     <fd:pattern>MM/dd/yyyy</fd:pattern>
     <fd:pattern locale="de_CH">dd.MM.yyyy</fd:pattern>
     <fd:pattern locale="de_CH">dd-MM-yyyy</fd:pattern>
   </fd:patterns>
</fd:convertor>

if i'm right, you can construct any pattern if you do it like in the 
SimpleDateFormat-javaclass.

greetings
stefan

Paul Joseph wrote:
> Hi,
> 
> I am using the CForms date field and the Matt-Kruse
> calendar widget that comes along with it.
> 
> Is it possible to allow the user to enter the date in
> more than one format for a given locale?
> 
> ex. 28/02/2005 or Feb 28, 2005 or 280205 and so on? 
> 
> I guess I could try to do a regex, but then will run
> into I18N issues (I think)
> 
> thx!
> Paul
> 
> =====
> This communication, including attachments, is for the exclusive use of 
> the addressee and may contain proprietary, confidential, or privileged
> information.  If you are not the intended recipient, any use, copying,
> disclosure, dissemination, or distribution is strictly prohibited.  If 
> you are not the intended recipient, please notify the sender by return mail and delete this communication and destroy all copies.


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