Skip to content

Commit 86b2bea

Browse files
author
Yasin Mansour (C)
committed
1813: Wrong rendering for the time picker when using maxDate and maxSpan
1 parent ab5c5ea commit 86b2bea

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
@@ -851,7 +851,7 @@
851851

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

854-
if (this.maxSpan && (!this.maxDate || this.startDate.clone().add(this.maxSpan).isAfter(this.maxDate)))
854+
if (this.maxSpan && (!this.maxDate || this.startDate.clone().add(this.maxSpan).isBefore(this.maxDate)))
855855
maxDate = this.startDate.clone().add(this.maxSpan);
856856

857857
if (side == 'left') {

0 commit comments

Comments
 (0)