fixed min max dates handling, closes #123

This commit is contained in:
t1m0n 2016-09-21 12:27:33 +03:00
parent 28c56d2cf4
commit ec46ba154e
3 changed files with 5 additions and 5 deletions

View File

@ -1895,10 +1895,10 @@
switch (this.d.view) { switch (this.d.view) {
case 'days': case 'days':
if (!this.d._isInRange(new Date(y, m-1, d), 'month')) { if (!this.d._isInRange(new Date(y, m-1, 1), 'month')) {
this._disableNav('prev') this._disableNav('prev')
} }
if (!this.d._isInRange(new Date(y, m+1, d), 'month')) { if (!this.d._isInRange(new Date(y, m+1, 1), 'month')) {
this._disableNav('next') this._disableNav('next')
} }
break; break;

File diff suppressed because one or more lines are too long

View File

@ -89,10 +89,10 @@
switch (this.d.view) { switch (this.d.view) {
case 'days': case 'days':
if (!this.d._isInRange(new Date(y, m-1, d), 'month')) { if (!this.d._isInRange(new Date(y, m-1, 1), 'month')) {
this._disableNav('prev') this._disableNav('prev')
} }
if (!this.d._isInRange(new Date(y, m+1, d), 'month')) { if (!this.d._isInRange(new Date(y, m+1, 1), 'month')) {
this._disableNav('next') this._disableNav('next')
} }
break; break;