You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by JeroenM <je...@hotmail.com> on 2009/10/12 09:30:57 UTC

tr:chooseDate date format different then DateFormat.getDateTimeInstance(DateFormat.SHORT

Hi Friends,

I'm having trouble with the tr:chooseDate component. For some reason the
component returns a different format (MM/dd/yyyy) than the default format
defined by my regional settings (dd-mm-yyyy).

If I test the format with code like 

String today = DateFormat.getDateTimeInstance(DateFormat.SHORT, 
DateFormat.SHORT).format(date);
System.out.println("Today " + today);

The result is correct, however the calendar control gives me an (mm/dd/yyyy)
notation. Is there any way to override / correct this? 


-- 
View this message in context: http://www.nabble.com/tr%3AchooseDate-date-format-different-then-DateFormat.getDateTimeInstance%28DateFormat.SHORT-tp25851533p25851533.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: tr:chooseDate date format different then DateFormat.getDateTimeInstance(DateFormat.SHORT

Posted by Yee-wah Lee <ye...@oracle.com>.
JeroenM wrote:
> I found out that adding <tr:convertDateTime pattern="dd-MM-yyyy"/> to the
> calendar solved my problem. Unfortunate this doesn't apply regional settings
>
>   
Hi Jeroen,

Do you have <formatting-locale> set in trinidad-config.xml?
http://myfaces.apache.org/trinidad/devguide/configuration.html

Yee-Wah

Re: tr:chooseDate date format different then DateFormat.getDateTimeInstance(DateFormat.SHORT

Posted by JeroenM <je...@hotmail.com>.
I found out that adding <tr:convertDateTime pattern="dd-MM-yyyy"/> to the
calendar solved my problem. Unfortunate this doesn't apply regional settings

-- 
View this message in context: http://www.nabble.com/tr%3AchooseDate-date-format-different-then-DateFormat.getDateTimeInstance%28DateFormat.SHORT-tp25851533p25854805.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.