diff --git a/bower.json b/bower.json
index 3d0a27e4..5bbab50b 100644
--- a/bower.json
+++ b/bower.json
@@ -24,7 +24,7 @@
"iron-icon": "polymerelements/iron-icon#~1.0.7",
"iron-icons": "polymerelements/iron-icons#~1.1.2",
"iron-input": "polymerelements/iron-input#~1.0.8",
- "iron-list": "polymerelements/iron-list#~1.2.0",
+ "iron-list": "polymerelements/iron-list#~1.0.0",
"paper-input": "polymerelements/paper-input#~1.1.5",
"polymer": "Polymer/polymer#^1.2.0",
"paper-styles": "polymerelements/paper-styles#^1.1.3"
diff --git a/test/basic.html b/test/basic.html
index 8546f55a..9e452f94 100644
--- a/test/basic.html
+++ b/test/basic.html
@@ -48,13 +48,20 @@
expect(spy.calledOnce).to.be.true;
});
- it('should open on tap', function(done) {
+ it('should open on input tap', function(done) {
datepicker.addEventListener('iron-overlay-opened', function() {
done();
});
tap(datepicker.$.input);
});
+ it('should open on label tap', function(done) {
+ datepicker.addEventListener('iron-overlay-opened', function() {
+ done();
+ });
+ tap(datepicker.$.label);
+ });
+
it('should scroll to today by default', function(done) {
var spy = sinon.spy(datepicker.$.overlay, 'scrollToDate');
datepicker.addEventListener('iron-overlay-opened', function() {
@@ -74,12 +81,12 @@
datepicker._open();
});
- it('should close on overlay datetap', function(done) {
+ it('should close on overlay date tap', function(done) {
datepicker.addEventListener('iron-overlay-closed', function() {
done();
});
datepicker.addEventListener('iron-overlay-opened', function() {
- Polymer.Base.fire('datetap', {}, {
+ Polymer.Base.fire('date-tap', {}, {
bubbles: true,
node: datepicker.$.overlay
});
diff --git a/test/month-calendar.html b/test/month-calendar.html
index ad804eea..3342f00e 100644
--- a/test/month-calendar.html
+++ b/test/month-calendar.html
@@ -96,9 +96,9 @@
expect(valueChangedSpy.calledOnce).to.be.true;
});
- it('should fire datetap on tap', function() {
+ it('should fire date-tap on tap', function() {
tapSpy = sinon.spy();
- monthCalendar.addEventListener('datetap', tapSpy);
+ monthCalendar.addEventListener('date-tap', tapSpy);
var dateElements = monthCalendar.$.monthGrid.querySelectorAll('div:not(.weekday):not(:empty)');
tap(dateElements[10]);
expect(tapSpy.calledOnce).to.be.true;
diff --git a/vaadin-date-picker-overlay.html b/vaadin-date-picker-overlay.html
index 458d2b66..cfd393a4 100644
--- a/vaadin-date-picker-overlay.html
+++ b/vaadin-date-picker-overlay.html
@@ -1,6 +1,7 @@
+
@@ -73,9 +74,11 @@
_visibleMonthIndex: Number,
- _months: Array,
+ _months: {
+ computed: '_computeMonths(_originIndex)'
+ },
- // As iron-list isn't two way scrollable by default, it needs to pre-scrolled
+ // As iron-list isn't two way scrollable by default, it needs to be pre-scrolled
// to an index in the middle beforehand. This property states the index of the
// 'origin' position in the array and also dictates the array size at the same
// time.
@@ -85,12 +88,12 @@
},
- ready: function() {
+ _computeMonths: function(_originIndex) {
var months = [];
- for (var i = -this._originIndex; i < this._originIndex; i++) {
- months.push(i);
+ for (var i = -_originIndex; i < _originIndex; i++) {
+ months.push('' + i);
}
- this._months = months;
+ return months;
},
/**
@@ -110,7 +113,7 @@
_dateAfterXMonths: function(date, months) {
var result = new Date(date);
- result.setMonth(months + date.getMonth());
+ result.setMonth(parseInt(months) + date.getMonth());
return result;
},
diff --git a/vaadin-date-picker.html b/vaadin-date-picker.html
index 8e28cb0b..49370f08 100644
--- a/vaadin-date-picker.html
+++ b/vaadin-date-picker.html
@@ -1,6 +1,6 @@
@@ -60,7 +60,7 @@
-
+
diff --git a/vaadin-month-calendar.html b/vaadin-month-calendar.html
index 2ef4b49c..59560bea 100644
--- a/vaadin-month-calendar.html
+++ b/vaadin-month-calendar.html
@@ -1,4 +1,5 @@
+
@@ -181,7 +182,7 @@
_handleTap: function(e) {
if (e.target.date) {
this.selectedDate = e.target.date;
- this.fire('datetap');
+ this.fire('date-tap');
}
}