[ 
https://issues.apache.org/jira/browse/TRINIDAD-2133?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13089869#comment-13089869
 ] 

Yee-Wah Lee commented on TRINIDAD-2133:
---------------------------------------

The convertDateTime uses the javascript Date APIs to create/validate the date, 
however, JS still uses GregorianCalendar 
http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-262%20edition%205.1,%20June%202011.pdf

To support this scenario, the convertDateTime peer would have to add/subtract 
the year offset when displaying/parsing. 

> Support Thai Buddhist calendar in client DateTimeConverter
> ----------------------------------------------------------
>
>                 Key: TRINIDAD-2133
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-2133
>             Project: MyFaces Trinidad
>          Issue Type: Improvement
>          Components: Components
>    Affects Versions: 2.0.0
>            Reporter: Yee-Wah Lee
>            Priority: Minor
>
> 1. Create and run the following jspx
> <tr:inputText is d="dt" autoSubmit="true" value="#{input.date}">
>                 <tr:convertDateTime locale="th_TH"/>
>                 </tr:inputText>
>                 <tr:outputText value="#{input.date}" partialTriggers="dt">
>                 <tr:convertDateTime locale="en_US"/>
>                 </tr:outputText>
> 2. The page will display the date using the Thai Buddhist Calendar, then the 
> date in US format (which uses GregorianCalendar on the server side). The Thai 
> Buddhist calendar is offset by 543 years from the Gregorain, e.g. the 
> inputText shows   22/8/2554 and the outputText shows 8/22/2011 .
> 3. Update the inputText to 29/2/2555 which is equivalent to 2/29/2012 
> Gregorian, a valid date. However this gives an error, "Enter a valid date or 
> time".
>                 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to