From 86b2bea80e847c423becbbe8d207d2db344d4efd Mon Sep 17 00:00:00 2001 From: "Yasin Mansour (C)" Date: Thu, 16 Aug 2018 13:07:22 +0300 Subject: [PATCH] 1813: Wrong rendering for the time picker when using maxDate and maxSpan --- daterangepicker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daterangepicker.js b/daterangepicker.js index 2279f75b..f3f32e41 100644 --- a/daterangepicker.js +++ b/daterangepicker.js @@ -851,7 +851,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') {