diff --git a/package.json b/package.json
index 93806ac..40b421b 100644
--- a/package.json
+++ b/package.json
@@ -18,7 +18,7 @@
"merge-stream": "^0.1.8",
"portfinder": "^0.4.0",
"vinyl-paths": "^1.0.0",
- "web-component-tester": "^3.3.3"
+ "web-component-tester": "^5.0.0"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
diff --git a/paper-calendar.html b/paper-calendar.html
index 1b6d8a2..772433a 100644
--- a/paper-calendar.html
+++ b/paper-calendar.html
@@ -524,7 +524,7 @@
}.bind(this));
},
_swipeNextMonth: function() {
- if (!this.maxDate || this.currentYear < this.maxDate.getFullYear() || this.currentMonth < this.maxDate.getMonth() + 1) {
+ if (!this.maxDate || moment([this.currentYear, this.currentMonth, 1]).isSameOrBefore(this.maxDate, 'month')) {
this._translateX(-this._containerWidth * 2, 'swipe', function() {
this.set('_contentClass', '');
this.transform('translateX(' + this._startPos + 'px)', this.$.months);
@@ -613,6 +613,8 @@
this.currentYear = year;
this.currentMonth = month;
}
+ console.log('ON SWIPE');
+ console.log(this.currentMonth);
},
_prevMonth: function() {
this._incrMonth(-1);
diff --git a/test/paper-date-picker.html b/test/paper-date-picker.html
index 2f3d872..bc7971d 100644
--- a/test/paper-date-picker.html
+++ b/test/paper-date-picker.html
@@ -21,6 +21,16 @@
+
+
+
+
+
+
+