Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Date Picker – problematic change in behavior breaks my JavaScript code

Arie GellerSep 7 2022

Hello,
I have an application that I started to develop in APEX 20.1.
For my date items, the users can pick a date from the (built-in) popup calendar, but I’m also allowing them to key in 8 digits in the format of DDMMYYYY (which is faster, especially for history dates). Then, an onblur (Lose Focus) event fires a JavaScript function that takes the input value, adds the delimited characters, checks the validity of the date, and in some cases, according to the business logic, manipulates it (e.g., TRUNC, ROUND, etc.). It works very well and without any problems.
Currently, I’m using APEX 22.1. The Date Picker items are defined as Date Picker (jQuery)[Deprecated]. Recently I made some changes to a page with a Date Picker item. So naturally, I changed its definition to the (not deprecated) Date Picker, and the JavaScript code stopped working correctly. It seems that the new Date Picker runs some validations of its own, and when it finds an error, it breaks my JavaScript code, which doesn’t get to run. For example, I’m getting the following error:
Uncaught Error: value must be an iso string: Error: The string 07092022 is not a valid ISO 8601 string syntax from the jetDatePickerBundle.min.js?v=22.1.4:8 file.
This Date Picker change in behavior is very problematic for me. It breaks my code. Is there a way to disable the new validation checks the new Date Picker runs on its own?
I appreciate all the help I can get.
Thanks,
Arie,

Comments
Post Details
Added on Sep 7 2022
3 comments
970 views