Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit d66d211bedc060c3a4f4fa65ca527e3c8a2252f8 1 parent 8256c99
@dnerdy authored
Showing with 13 additions and 4 deletions.
  1. +13 −4 src/dateinput/dateinput.js
View
17 src/dateinput/dateinput.js
@@ -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);
Please sign in to comment.
Something went wrong with that request. Please try again.