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!

APEX 21.1 Execute Validations setting not validating Jet date pickers correctly

Tony AndrewsJul 12 2021 — edited Jul 12 2021

I have created a demo of this on apex.oracle.com:
https://apex.oracle.com/pls/apex/tonyng/r/apex-21-19/date-validation-on-item-submit
(username/password: demo/demo)
The page has 2 date picker items (new APEX 21.1 Jet date picker). The first is mandatory, the second is optional.
There is also a select list item that has Page Action On Selection = Submit Page and Execute Validations = true
There is a button Submit that has Execute Validations = true.
If I enter invalid dates into both date fields and press Submit I get this result:
Screenshot 2021-07-12 162041.pngIt seems to think Start Date is null.
If I change the select list (which submits the page and validates) I get:
Screenshot 2021-07-12 162223.pngThis time there is no validation message for the End Date at all.
Now I set Start Date (the mandatory one) to a valid value:
Screenshot 2021-07-12 162403.pngWhen I change the select list (which submits the page with validation) this happens:
Screenshot 2021-07-12 162523.pngNo error message, instead it has just cleared the End Date field. If I had used the Submit button instead, I would have got the correct message. Since the End Date is optional I can now save the record, perhaps not noticing that I don't have an end date when I thought I'd typed one in.
See also this related question of mine, where without client-side validation enabled any invalid dates entered manually just get set to null on submit:
https://community.oracle.com/tech/developers/discussion/4486023/apex-21-1-jet-date-picker-clears-input-if-invalid
I have been working on implementing client-side validation to overcome that, but hit the issues above.

This post has been answered by Anthony Rayner-Oracle on Jul 13 2021
Jump to Answer
Comments
Post Details
Added on Jul 12 2021
4 comments
1,358 views