-
Bug
-
Resolution: Fixed
-
Normal
-
8.6.0
-
None
-
Security Level: Jimmy
-
None
-
None
Steps to Reproduce
run following datebox with 8.6.0.FL.20181023
<datebox lenient="true" strictDate="true" format="dd.MM.yyyy"></datebox>
input the date: 31.11.2018
Current Result
Datebox will switch to 01.12.2018
Expected Result
Datebox should reject the date (strictDate=true)
Debug Info
strictDate is evaluated before formatting.
If the formatted date is different than the input string, the result date may rejected while it is valid, or not rejected while it is not valid.
strictDate:
https://github.com/zkoss/zk/blob/master/zul/src/archive/web/js/zul/db/datefmt.js#L325
formatting:
https://github.com/zkoss/zk/blob/master/zul/src/archive/web/js/zul/db/datefmt.js#L389-L396
Could be improved by checking the same values checked during strict mode checks here:
https://github.com/zkoss/zk/blob/master/zul/src/archive/web/js/zul/db/datefmt.js#L389-L396
Root Cause
Workaround
- relates to
-
ZK-4023 Add strict valid date support to Datebox without lenient mode
- Closed