Skip to content
This repository
Browse code

Fixed directionScrolling edge case where previous month action wasn't…

… available for current month with today-future and next month action wasn't available for current month with today-past
  • Loading branch information...
commit a2d134437252f916c882ad7fd3d03bf928e891f1 1 parent 3bf01e9
Adam McElwee acmcelwee authored

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. +2 2 src/main.js
4 src/main.js
@@ -445,7 +445,7 @@ Kalendae.prototype = {
445 445 var diff = -(moment().diff(month, 'months'));
446 446 if (opts.direction==='today-past' || opts.direction==='past') {
447 447
448   - if (diff <= 0) {
  448 + if (diff < 0) {
449 449 this.disableNextMonth = false;
450 450 util.removeClassName(this.container, classes.disableNextMonth);
451 451 } else {
@@ -455,7 +455,7 @@ Kalendae.prototype = {
455 455
456 456 } else if (opts.direction==='today-future' || opts.direction==='future') {
457 457
458   - if (diff > opts.months) {
  458 + if (diff >= opts.months) {
459 459 this.disablePreviousMonth = false;
460 460 util.removeClassName(this.container, classes.disablePreviousMonth);
461 461 } else {

0 comments on commit a2d1344

Please sign in to comment.
Something went wrong with that request. Please try again.