Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    5.1p / 6.0p: DateItem date parsing bug in ListGrid-editRow

    Hi Isomorphic,

    please see this sample in either EN or DE locale.
    Edit a row and enter this as date in the Independence-TextItem and hit enter: 2014/21/11
    As you can see, the parsed date is 11.09.2015 afterwards.
    Other dates not in the expected format as parsed OK (in DE), e.g.: 2014/11/21, 2014-11-21

    This happens in latest 5.1p I'm using and in the Online Showcase.

    Best regards
    Blama

    #2
    What were you expecting? The framework currently does not try to guess the MDY order the user has typed in; it just assumes the input is in the configured MDY order, and if it's not, bad parsing is expected.

    Comment


      #3
      Hi Isomorphic,

      I'd expect no value or old value in cases where the new value can't be parsed. Always requesting MDY is reasonable, but this is not what happens. Some other formats are also parsed successfully.
      Entering some data and then getting sth completely different like 2014/21/11 -> 11.09.2015 is very unexpected.

      Best regards
      Blama

      Comment


        #4
        That behavior comes from "lenient" parsing mode Java's SimpleDateFormat.parse(), which is active if you don't call setLenient(false). We agree it's surprising and odd, so we turned off lenient parsing.

        Comment


          #5
          Hi Isomorphic,

          just to let you know: The behavior is still the same in the linked showcase example (now using current v11.0p_2016-07-14).

          Best regards
          Blama

          Comment

          Working...
          X