Closed lahsivjar closed 7 years ago
FYI, I failed to generate the issue in plunker (http://plnkr.co/edit/9c787GHiBzX7zI5x6gsX) since the code used there seems to be old and doesn't have the problem.
I met the same problem, and your code can fix this problem.
thx for the fix, works perfectly (paper-date-picker 1.2.0)
I found a bug when specifying a maxDate as a value which is in next year than the current selection for example:
<paper-date-picker date="September 09, 2016" min-date="September 09, 2016" max-date="March 12, 2017"></paper-date-picker>
In such case nothing happens when you try to navigate to another year. The problem comes from line number: https://github.com/bendavis78/paper-date-picker/blame/master/paper-calendar.html#L526
The reason is that the if condition in this line is not correct. Adding another OR should solve the issue:
if (!this.maxDate || this.currentYear < this.maxDate.getFullYear() || this.currentMonth < this.maxDate.getMonth() + 1) {