Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
When selecting already selected day (and multidate: false), it toggles it off and clears the input field. This can be very confusing especially if using autoclose feature.
  • Loading branch information
KaarloH committed Feb 13, 2014
1 parent 8bc254a commit 9aa3eb4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions js/bootstrap-datepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -1017,12 +1017,12 @@
if (!date){
this.dates.clear();
}
else if (ix !== -1){
this.dates.remove(ix);
}
else {
else if (ix == -1){
this.dates.push(date);
}
else if ((typeof this.o.multidate === 'number' && this.o.multidate > 1) || this.o.multidate === true){
this.dates.remove(ix);
}
if (typeof this.o.multidate === 'number')
while (this.dates.length > this.o.multidate)
this.dates.remove(0);
Expand Down

0 comments on commit 9aa3eb4

Please sign in to comment.