Skip to content

Commit

Permalink
Merge pull request #1816 from yasin-mansour/master
Browse files Browse the repository at this point in the history
1813: Wrong rendering for the time picker when using maxDate and maxSpan
  • Loading branch information
dangrossman authored Apr 11, 2019
2 parents df0e46c + 86b2bea commit 80758ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion daterangepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -858,7 +858,7 @@

var html, selected, minDate, maxDate = this.maxDate;

if (this.maxSpan && (!this.maxDate || this.startDate.clone().add(this.maxSpan).isAfter(this.maxDate)))
if (this.maxSpan && (!this.maxDate || this.startDate.clone().add(this.maxSpan).isBefore(this.maxDate)))
maxDate = this.startDate.clone().add(this.maxSpan);

if (side == 'left') {
Expand Down

0 comments on commit 80758ca

Please sign in to comment.