Skip to content

Commit 80758ca

Browse files
authored
Merge pull request #1816 from yasin-mansour/master
1813: Wrong rendering for the time picker when using maxDate and maxSpan
2 parents df0e46c + 86b2bea commit 80758ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

daterangepicker.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -858,7 +858,7 @@
858858

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

861-
if (this.maxSpan && (!this.maxDate || this.startDate.clone().add(this.maxSpan).isAfter(this.maxDate)))
861+
if (this.maxSpan && (!this.maxDate || this.startDate.clone().add(this.maxSpan).isBefore(this.maxDate)))
862862
maxDate = this.startDate.clone().add(this.maxSpan);
863863

864864
if (side == 'left') {

0 commit comments

Comments
 (0)