-
Notifications
You must be signed in to change notification settings - Fork 517
Open
Description
(issue should be labeled datepicker)
If I currently (2011) show the month November, some dates in December are also shown. If any of those December-dates are larger than max date (lets say max is set to December 6th), the next arrow (i.e. the arrow icon that points right and when clicked shows the next month) will be hidden.
I have included a patch that should clearify the problem and solution.
--- jquery.tools.dateinput.js (revision 6937)
+++ jquery.tools.dateinput.js (working copy)
@@ -555,12 +555,16 @@
weeks.append(week);
}
+ isOff = false;
+
if (j < begin) {
+ isOff = true;
a.addClass(css.off);
num = prevDays - begin + j + 1;
date = new Date(year, month-1, num);
} else if (j >= begin + days) {
+ isOff = true;
a.addClass(css.off);
num = j - days - begin + 1;
date = new Date(year, month+1, num);
@@ -585,7 +589,8 @@
}
if (max && date > max) {
- a.add(nm).addClass(css.disabled);
+ a.addClass(css.disabled);
+ if(!isOff) { nm.addClass(css.disabled); }
}
a.attr("href", "#" + num).text(num).data("date", date);