You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Barry Books (JIRA)" <ji...@apache.org> on 2013/09/06 13:25:51 UTC

[jira] [Created] (TAP5-2173) Tapestry DateField converts invalid dates to valid ones.

Barry Books created TAP5-2173:
---------------------------------

             Summary: 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira