You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In short words : the previous page is enabled (in some cases) while it shouldn't be
Below one of the cases we faced:
start date : 01-FEB-2023
Calendar is limited between
min date : 01-FEB-2023
max date : 28-FEB-2023
The user can only pick days in FEB (not JAN nor MAR).
The next page button is disabled (which is okay)
The previous page button is enabled (WRONG!!)
Cause:
The issue is due to a bug in CalendarController.js update function where the dates are being compared without taking into consideration the Time :
Line 531 - json.setValue(settings, "minValue", dateUtils.removeTime(settings.minValue));
Line 600 - startDate = new Date(startDate.getFullYear(), startDate.getMonth(), 1, 12);
The last parameter is generating a date at noon and then once compared with the minimum date :
Line 627 - json.setValue(calendar, "previousPageEnabled", !minValue || minValue < startDate);
The result is TRUE whilst it should be FALSE
The text was updated successfully, but these errors were encountered:
rghosn
added a commit
to rghosn/ariatemplates
that referenced
this issue
Jan 18, 2023
As explained in the issue, in some cases, we have the previouspageenabled attribute with a wrong value causing our date picker to show the previous button.
In this fix, I removed the hour parameter in the new Date() constructor, and called removeTime to ensure that the dates are being compared without taking time into consideration.
Also, I added two new test cases to ensure that the changes are working well.
Closeariatemplates#1860
In short words : the previous page is enabled (in some cases) while it shouldn't be
Below one of the cases we faced:
start date : 01-FEB-2023
Calendar is limited between
min date : 01-FEB-2023
max date : 28-FEB-2023
The user can only pick days in FEB (not JAN nor MAR).
The next page button is disabled (which is okay)
The previous page button is enabled (WRONG!!)
Cause:
The issue is due to a bug in CalendarController.js update function where the dates are being compared without taking into consideration the Time :
The last parameter is generating a date at noon and then once compared with the minimum date :
The result is TRUE whilst it should be FALSE
The text was updated successfully, but these errors were encountered: