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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

APEX VALIDATION FAILS IN MICROSOFT EDGE FOR SOME USERS

Flavia PereiraMar 20 2025 — edited Mar 20 2025

I am facing a date validation issue in an APEX application.

The validation has been implemented correctly to ensure that the collection date (P1_COLLECT_DATE) falls within a start date (P1_START_DATE) and end date (P1_END_DATE). The validation works correctly for most users in browsers like Edge and Firefox, but some users are experiencing issues specifically when using Microsoft Edge. It's like the browser is stuck with the previous validation configuration and didn't update to the new one.

Basically there is a field called period with the range (31/03/25 - 03/04/25),

and then, there is another field called COLLECT_DATE, and the date should be in the range of the period field.

No matter the date I choose, even 01-04-25 (a valid date in the range), I have the error from the validation: Check collection date.

PS: The field collection date is a date picker and the date format is being displayed like 31-03-25. (Tried to change the format inside the date picket configuration, but the error remains. That's why I decided to treat with a to_date inside the validation.

The validation is attempting to compare the dates using the following code:

BEGIN
IF :P1_COLLECT_DATE IS NOT NULL
AND :P1_START_DATE IS NOT NULL
AND :P1_END_DATE IS NOT NULL THEN

IF TRUNC(TO_DATE(:P1_COLLECT_DATE, 'DD-MM-YYYY'))
NOT BETWEEN TRUNC(TO_DATE(:P1_START_DATE, 'DD-MM-YYYY'))
AND TRUNC(TO_DATE(:P1_END_DATE, 'DD-MM-YYYY')) THEN
RETURN FALSE;
ELSE
RETURN TRUE;
END IF;
ELSE
RETURN FALSE;
END IF;
END;

This solution in the validation worked in 90% of the cases in both browsers (edge and firefox). But there are still some users with the old error(check collection date), and when they try by firefox it works. I then called those users, asked them to clean cache, cookies from edge browser but the error still doesn't disappear.

Do you have some tip about that? A to_date function inside a validation can impact the behaviour between browser?

As a matter of information, the three field collection_date, start_date and end_date have DATE as datatype in the database, and this validation was working before. After migrating from apex version 22 to 24 this error started popping up.

Thanks for any insights.

Comments

Post Details

Added on Mar 20 2025
10 comments
122 views