Skip to content

Commit

Permalink
Merge pull request #5 from andreasellervee/master
Browse files Browse the repository at this point in the history
Fix for moment().isBefore(minDate) to work on IE
  • Loading branch information
jeserkin committed Apr 27, 2016
2 parents 57cd2ad + a1f5e43 commit 4163c6d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions build/ndaterangepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -615,9 +615,9 @@
};
_getDateToSet = function() {
var dateToSet, currentDate = moment(), maxDate = scope.internalOptions.maxDate, minDate = scope.internalOptions.minDate;
if (maxDate && currentDate.isAfter(maxDate)) {
if (maxDate && currentDate.isAfter(_getMoment(maxDate))) {
dateToSet = _getMoment(maxDate);
} else if (minDate && currentDate.isBefore(minDate)) {
} else if (minDate && currentDate.isBefore(_getMoment(minDate))) {
dateToSet = _getMoment(minDate);
} else {
dateToSet = currentDate;
Expand Down
Loading

0 comments on commit 4163c6d

Please sign in to comment.