Permalink
Browse files

Merge pull request #38 from amcelwee/master

Fixed a couple edge cases for directionScrolling that were related to 'today-future', 'future', 'today-past', 'past'.
  • Loading branch information...
2 parents 3bf01e9 + a2d1344 commit ad0696405c5d95ae8622bfd223c86340abfec1d9 @ChiperSoft committed Apr 26, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/main.js
View
@@ -445,7 +445,7 @@ Kalendae.prototype = {
var diff = -(moment().diff(month, 'months'));
if (opts.direction==='today-past' || opts.direction==='past') {
- if (diff <= 0) {
+ if (diff < 0) {
this.disableNextMonth = false;
util.removeClassName(this.container, classes.disableNextMonth);
} else {
@@ -455,7 +455,7 @@ Kalendae.prototype = {
} else if (opts.direction==='today-future' || opts.direction==='future') {
- if (diff > opts.months) {
+ if (diff >= opts.months) {
this.disablePreviousMonth = false;
util.removeClassName(this.container, classes.disablePreviousMonth);
} else {

0 comments on commit ad06964

Please sign in to comment.