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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 8.6.0
    • Fix Version/s: 8.6.1
    • Component/s: Components
    • Labels:
      None
    • Environment:

      ZK 8.6.0

      Description

      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

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  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