maxDate and minDate interpret 2-yr date differently on client compared to server
--------------------------------------------------------------------------------

                 Key: TAPESTRY-1720
                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1720
             Project: Tapestry
          Issue Type: Bug
          Components: Core Components
    Affects Versions: 4.1.2
         Environment: JBoss 4.2.1
            Reporter: Geoff Callender


When pattern for entering dates has a 2-digit year, eg.

        translator="translator:date,pattern=MM/dd/yy"

the interpretation of maxDate or minDate values differs between client and 
server.

Server-side treats maxDate and minDate value as being within 80 years before 
now and 20 years after now.  
Eg. if now is 26 AUG 2007, then the range is 27 AUG 1907 to 26 AUG 2027.
This is the standard behaviour of SimpleDateFormat.

Client-side, however, treats maxDate and minDate value as being within the 1st 
day of the year 80 years ago and the last day of the year 19 years from now.
Eg. if now is 26 AUG 2007, then the range is 01 JAN 1907 to 31 DEC 2026.

Consequently, if I specify this...

        validators="validators:minDate=01/01/00,maxDate=01/01/27"

...then the server-side validator will be fine but the client-side validator 
will think the maxDate is in 1927, which is before the minDate in 2000, and 
therefore it will reject every date entered.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to