ICEfaces
  1. ICEfaces
  2. ICE-8819

ace:dateTimeEntry - add new "lenientParsing" attribute (was: Incorrect date converted on client side)

    Details

    • Assignee Priority:
      P1
    • Salesforce Case Reference:
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.), Compatibility/Configuration
    • Workaround Exists:
      Yes
    • Workaround Description:
      Using the "dd/MM/yyyy hh:mm" pattern seems to help to keep the correct pattern.

      Description

      When using the following date pattern, dd/MM/yyyy, selecting a date displays the correct patter. Upon manually changing the day value to an incorrect value, the date is still converted to a valid day.

      For example:
       - Set a date via the popup calendar: 11/12/2012
       - Manually change the day value to: 211/12/2012
       - The date is converted to: 29/06/2013

      This is done on the client side so there is no chance to validate the date.

        Activity

        Arran Mccullough created issue -
        Arran Mccullough made changes -
        Field Original Value New Value
        Salesforce Case Reference 5007000000PXTHwAAP
        Hide
        Arran Mccullough added a comment -

        Attached test case that shows the issue. Follow similar steps as mentioned in the issue description.

        Show
        Arran Mccullough added a comment - Attached test case that shows the issue. Follow similar steps as mentioned in the issue description.
        Arran Mccullough made changes -
        Attachment Case11790.zip [ 15101 ]
        Attachment Case11790WAR.zip [ 15102 ]
        Ken Fyten made changes -
        Assignee yip.ng [ yip.ng ]
        Fix Version/s EE-3.2.0.GA [ 10332 ]
        Fix Version/s 3.3 [ 10370 ]
        Assignee Priority P1 [ 10010 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #32793 Wed Dec 12 18:07:21 MST 2012 yip.ng ICE-8819: ace:dateTimeEntry - Incorrect date converted on client side.
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/datetimeentry/DateTimeEntryMeta.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/datetimeentry/DateTimeEntryRenderer.java
        Hide
        yip.ng added a comment -

        This has nothing to do with jQuery datepicker. It is standard behavior with lenient Java date parsing. (Search the web to understand more.) If we set the leniency to false, then a stricter parsing would be done, resulting in a conversion error. See video http://screencast.com/t/QdBuCU6qF2.

        PF uses default leniency of true in Java date parsing. Change it to use false? Add an attribute for DateTimeEntry? Tell the user to use his own converter to do strict parsing?

        Show
        yip.ng added a comment - This has nothing to do with jQuery datepicker. It is standard behavior with lenient Java date parsing. (Search the web to understand more.) If we set the leniency to false, then a stricter parsing would be done, resulting in a conversion error. See video http://screencast.com/t/QdBuCU6qF2 . PF uses default leniency of true in Java date parsing. Change it to use false? Add an attribute for DateTimeEntry? Tell the user to use his own converter to do strict parsing?
        yip.ng made changes -
        Attachment screenshot-01.png [ 15116 ]
        Hide
        yip.ng added a comment - - edited

        Done. See screenshot-01.

        Modified: C:\svn\ossrepo\icefaces3\trunk\icefaces\ace\component\src\org\icefaces\ace\component\datetimeentry\DateTimeEntryMeta.java
        Modified: C:\svn\ossrepo\icefaces3\trunk\icefaces\ace\component\src\org\icefaces\ace\component\datetimeentry\DateTimeEntryRenderer.java
        Completed: At revision: 32793

        Show
        yip.ng added a comment - - edited Done. See screenshot-01. Modified: C:\svn\ossrepo\icefaces3\trunk\icefaces\ace\component\src\org\icefaces\ace\component\datetimeentry\DateTimeEntryMeta.java Modified: C:\svn\ossrepo\icefaces3\trunk\icefaces\ace\component\src\org\icefaces\ace\component\datetimeentry\DateTimeEntryRenderer.java Completed: At revision: 32793
        yip.ng made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #32811 Thu Dec 13 17:20:09 MST 2012 yip.ng ICE-8819: ace:dateTimeEntry - Incorrect date converted on client side.
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/datetimeentry/DateTimeEntryMeta.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/datetimeentry/DateTimeEntryRenderer.java
        Hide
        Ken Fyten added a comment -

        Let's rename the new attribute to "lenientParsing".

        Show
        Ken Fyten added a comment - Let's rename the new attribute to "lenientParsing".
        Ken Fyten made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Ken Fyten made changes -
        Summary ace:dateTimeEntry - Incorrect date converted on client side ace:dateTimeEntry - add new "lenientParsing" attribute (was: Incorrect date converted on client side)
        Ken Fyten made changes -
        Issue Type Bug [ 1 ] Improvement [ 4 ]
        Affects Documentation (User Guide, Ref. Guide, etc.),Compatibility/Configuration [ 10003, 10002 ]
        Hide
        yip.ng added a comment -

        Done.

        Modified: C:\svn\ossrepo\icefaces3\trunk\icefaces\ace\component\src\org\icefaces\ace\component\datetimeentry\DateTimeEntryMeta.java
        Modified: C:\svn\ossrepo\icefaces3\trunk\icefaces\ace\component\src\org\icefaces\ace\component\datetimeentry\DateTimeEntryRenderer.java
        Completed: At revision: 32811

        Show
        yip.ng added a comment - Done. Modified: C:\svn\ossrepo\icefaces3\trunk\icefaces\ace\component\src\org\icefaces\ace\component\datetimeentry\DateTimeEntryMeta.java Modified: C:\svn\ossrepo\icefaces3\trunk\icefaces\ace\component\src\org\icefaces\ace\component\datetimeentry\DateTimeEntryRenderer.java Completed: At revision: 32811
        yip.ng made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Fix Version/s EE-3.2.0.BETA [ 10573 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            yip.ng
            Reporter:
            Arran Mccullough
          • Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: