Permalink
Browse files

Fixed pm (previous month) and nm (next month) so that they are only d…

…isabled when min or max

occurs in the current month being shown.
  • Loading branch information...
1 parent 8256c99 commit d66d211bedc060c3a4f4fa65ca527e3c8a2252f8 @dnerdy committed Mar 2, 2012
Showing with 13 additions and 4 deletions.
  1. +13 −4 src/dateinput/dateinput.js
View
@@ -580,16 +580,25 @@
// today
} else if (isSameDay(now, date)) {
a.attr("id", css.today);
- }
+ }
+
+ // disabled
+ if (min && date < min) {
+ pm.addClass(css.disabled);
+ }
+
+ if (max && date > max) {
+ nm.addClass(css.disabled);
+ }
}
-
+
// disabled
if (min && date < min) {
- a.add(pm).addClass(css.disabled);
+ a.addClass(css.disabled);
}
if (max && date > max) {
- a.add(nm).addClass(css.disabled);
+ a.addClass(css.disabled);
}
a.attr("href", "#" + num).text(num).data("date", date);

0 comments on commit d66d211

Please sign in to comment.