You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by aashoku <aa...@gmail.com> on 2008/07/16 12:13:12 UTC

Allowing more than two date formats for tr:inputDate component

When tr:inputDate component is used to set a date, one can give convert it to
a maximum of two formats using tr:convertDateAndTime converter and using
attributes  "pattern" and "secondPattern". 

In case one requires to accept a date in any format(more than 2 formats) and
not just get restricted to two (stated above) ,how can one achieve?

Is there any other component other than  tr:inputDate to achieve such
scenario or what methodology?

Your suggestions are our beginning steps for completion of this great
task:working:





 
-- 
View this message in context: http://www.nabble.com/Allowing-more-than-two-date-formats-for-tr%3AinputDate-component-tp18484364p18484364.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: Allowing more than two date formats for tr:inputDate component

Posted by Vasista <rb...@gmail.com>.
Hi,
  For <tr:convertDateTime> ,i think its better to have 2 formats such that
the user doesn't confuse on various formats 
Ex: 10/10/2008 is not recognizable from M/d/yyyy and d/MM/yyyy formats.
Such types of conflicts may rise if we provide multiple date formats.
 This is just my opinion,let me know if it wrong.

-Bandaru



aashoku wrote:
> 
> When tr:inputDate component is used to set a date, one can give convert it
> to a maximum of two formats using tr:convertDateAndTime converter and
> using attributes  "pattern" and "secondPattern". 
> 
> In case one requires to accept a date in any format(more than 2 formats)
> and not just get restricted to two (stated above) ,how can one achieve?
> 
> Is there any other component other than  tr:inputDate to achieve such
> scenario or what methodology?
> 
> Your suggestions are our beginning steps for completion of this great
> task:working:
> 
> 
> 
> 
> 
>  
> 

-- 
View this message in context: http://www.nabble.com/Allowing-more-than-two-date-formats-for-tr%3AinputDate-component-tp18484364p18522807.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: Allowing more than two date formats for tr:inputDate component

Posted by aashoku <aa...@gmail.com>.
Hi Bandaru,

Thanks for your reply.

I want to allow the user in following formats,
1) MM-dd-yyyy
2)MMM-dd-yyyy
3)MM dd yyyy
4)MMM dd yyyy
5) MMM,dd,yyyy

please help me out.
Ashok.
-- 
View this message in context: http://www.nabble.com/Allowing-more-than-two-date-formats-for-tr%3AinputDate-component-tp18484364p18525550.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.