tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thiago H. de Paula Figueiredo (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (TAP5-2173) Tapestry DateField converts invalid dates to valid ones.
Date Wed, 30 Oct 2013 11:14:25 GMT

     [ https://issues.apache.org/jira/browse/TAP5-2173?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Thiago H. de Paula Figueiredo resolved TAP5-2173.

    Resolution: Duplicate

Duplicate of TAP5-1998.

> Tapestry DateField converts invalid dates to valid ones.
> --------------------------------------------------------
>                 Key: TAP5-2173
>                 URL: https://issues.apache.org/jira/browse/TAP5-2173
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.4
>            Reporter: Barry Books
> The combination of the DateField component and the conversion of strings to SimpleDateFormat
result in the DateField converting invalid dates to valid ones. There are really two problems.
The default for SimpleDateFormat is lenient so strings are converted with lenient set to true.
This causes the date conversion to changes dates like 9/32/2013 to Wed Oct 02 00:00:00 CDT
2013. The second problem is DateField allows extra characters after the valid part of the
date. For example 9/01/2013ffff converts to Sun Sep 01 00:00:00 CDT 2013. This is more of
a problem with formats such as yyyy-MM-dd because a date such as 2013-09-061 is allowed and
converted to Thu Oct 31 00:00:00 CDT 2013.

This message was sent by Atlassian JIRA

View raw message