Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-4178

"Aug 32, 2018" became valid in lenient datebox after ZK-4023

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 8.6.1
    • 8.6.0
    • Components
    • None
    • ZK 8.6.0

    • None

      Steps to Reproduce

      <zk>
          <datebox format="MMM d yyyy" lenient="true"/>
      </zk>
      

      Input "Aug 32 2018"

      Current Result

      Accepted and parsed as "Sep 1 2018"

      Expected Result

      An error message should be popped.

      Debug Information

      Adding strictDate option shouldn't affect the lenient spec.

      https://github.com/zkoss/zk/blob/v8.5.2.1/zul/src/archive/web/js/zul/db/datefmt.js#L325
      Only 0 - 31 is valid.

      Jan 0 2018 => Dec 31 2018
      Feb 30 2018 => Mar 2 2018

      Workaround

            rudyhuang rudyhuang
            rudyhuang rudyhuang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 4 hours
                4h
                Remaining:
                Time Spent - 1 hour Remaining Estimate - 3 hours
                3h
                Logged:
                Time Spent - 1 hour Remaining Estimate - 3 hours
                1h