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
When setting a specific rule for enabled dates, the disabled ones are still selectable.
Example :
this.calendar.set("customRenderer",{rules: custom_rules,// "available" rulefilterFunction: function(date,node,rules){// ... add class to node}});this.calendar.set("enabledDatesRule","available");
Description
I found where the problem come from (I think).
In calendar-base.js (function "_renderCustomRulesHelper"), the SELECTION_DISABLED CSS class is added to the date that mismatch the "enabledDatesRule".
But in calendar.js (function "_clickCalendar"), the selection is possible if
I think I've encounter the same issue and the problem still exists in the master today.
After inspecting the HTML, I found that a cell that represents a day of next month and out of the range of enabledDatesRule is given both yui3-calendar-day and yui3-calendar-nextmonth-day class at the same time.
More specifically, when I set Jan 2014 to be the only enabled month and I navigate to next month, i.e. Feb 2014, then the day of Mar 2nd is appears to be available to select but of course can't be selected. And a two pane set does NOT have this problem initially, it only occurs when you've clicked prev/next arrows!
Summary
When setting a specific rule for enabled dates, the disabled ones are still selectable.
Example :
Description
I found where the problem come from (I think).
In calendar-base.js (function "_renderCustomRulesHelper"), the
SELECTION_DISABLED
CSS class is added to the date that mismatch the "enabledDatesRule".But in calendar.js (function "_clickCalendar"), the selection is possible if
"clickedCellIsDay" return true;
It make day with
SELECTION_DISABLED
CSS class selectable..Update
to
would fix this issue.
(Notice:
SELECTION_DISABLED
is not in "calendar" scope)Type
"Defect".
Component
Calendar
Observed in Version
YUI 3.9.0 (build 5827)
Browser
All browsers.
The text was updated successfully, but these errors were encountered: