fix removeDate when 1 range date is selected

This commit is contained in:
t1m0n 2015-12-10 12:33:34 +03:00
parent 5faa05997f
commit af6c066fad
3 changed files with 17 additions and 1 deletions

View File

@ -420,11 +420,19 @@ var Datepicker;
return selected.some(function (curDate, i) {
if (datepicker.isSame(curDate, date)) {
selected.splice(i, 1);
if (!_this.selectedDates.length) {
_this.minRange = '';
_this.maxRange = '';
}
_this.views[_this.currentView]._render();
_this._setInputValue();
if (_this.opts.onSelect) {
_this._triggerOnChange();
}
return true
}
})

File diff suppressed because one or more lines are too long

View File

@ -420,11 +420,19 @@ var Datepicker;
return selected.some(function (curDate, i) {
if (datepicker.isSame(curDate, date)) {
selected.splice(i, 1);
if (!_this.selectedDates.length) {
_this.minRange = '';
_this.maxRange = '';
}
_this.views[_this.currentView]._render();
_this._setInputValue();
if (_this.opts.onSelect) {
_this._triggerOnChange();
}
return true
}
})