Skip to content
This repository has been archived by the owner on Aug 6, 2020. It is now read-only.

Commit

Permalink
toggleDay now compares days instead of times
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris0lsen committed Aug 22, 2016
1 parent cee48c5 commit f192377
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions multipleDatePicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,13 +261,12 @@

if (day.selectable && !prevented) {
day.mdp.selected = !day.mdp.selected;

if (day.mdp.selected) {
scope.ngModel.push(day.date);
} else {
var idx = -1;
for (var i = 0; i < scope.ngModel.length; ++i) {
if (scope.ngModel[i].isSame(day.date)) {
if (scope.ngModel[i].isSame(day.date,'day')) {
idx = i;
break;
}
Expand Down

0 comments on commit f192377

Please sign in to comment.