[
https://issues.apache.org/jira/browse/TAPESTRY-1720?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Geoff Callender updated TAPESTRY-1720:
--------------------------------------
Description:
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 interprets maxDate and minDate values as being within a range of 80
years before now and 20 years after now.
Eg. on 26 AUG 2007 the range was 27 AUG 1907 to 26 AUG 2027.
This is the standard behaviour of SimpleDateFormat.
Client-side, however, interprets maxDate and minDate values as being within a
range of the 1st day of the year 80 years ago and the last day of the year 19
years from now.
Eg. on 26 AUG 2007 the range was 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 think the maxDate is in 2027 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.
was:
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.
> 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 interprets maxDate and minDate values as being within a range of
> 80 years before now and 20 years after now.
> Eg. on 26 AUG 2007 the range was 27 AUG 1907 to 26 AUG 2027.
> This is the standard behaviour of SimpleDateFormat.
> Client-side, however, interprets maxDate and minDate values as being within a
> range of the 1st day of the year 80 years ago and the last day of the year 19
> years from now.
> Eg. on 26 AUG 2007 the range was 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 think the maxDate is in 2027 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]