daterangepicker-4.x 4.6.2 → 4.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/daterangepicker.js +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -18,8 +18,8 @@ Above samples are based on the [original repository](https://github.com/dangross
|
|
|
18
18
|
```html
|
|
19
19
|
<script type="text/javascript" src="https://cdn.jsdelivr.net/jquery/latest/jquery.min.js"></script>
|
|
20
20
|
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/luxon@3.5.0/build/global/luxon.min.js"></script>
|
|
21
|
-
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/daterangepicker-4.x@4.6.
|
|
22
|
-
<link type="text/css" href="https://cdn.jsdelivr.net/npm/daterangepicker-4.x@4.6.
|
|
21
|
+
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/daterangepicker-4.x@4.6.3/daterangepicker.min.js"></script>
|
|
22
|
+
<link type="text/css" href="https://cdn.jsdelivr.net/npm/daterangepicker-4.x@4.6.3/daterangepicker.min.css" rel="stylesheet" />
|
|
23
23
|
|
|
24
24
|
<input type="text" id="daterange" />
|
|
25
25
|
|
package/daterangepicker.js
CHANGED
|
@@ -715,7 +715,7 @@
|
|
|
715
715
|
if (isValid === undefined || !isValid)
|
|
716
716
|
this.constrainDate();
|
|
717
717
|
|
|
718
|
-
if (!this.singleDatePicker) {
|
|
718
|
+
if (!this.singleDatePicker && !this.endDate) {
|
|
719
719
|
if (this.locale.durationFormat)
|
|
720
720
|
this.container.find('.drp-duration-label').html('');
|
|
721
721
|
if (typeof this.locale.format === 'object') {
|
|
@@ -2338,8 +2338,8 @@
|
|
|
2338
2338
|
}
|
|
2339
2339
|
if (this.singleDatePicker) {
|
|
2340
2340
|
this.endDate = this.startDate;
|
|
2341
|
-
} else if (this.endDate && this.endDate.hasSame(
|
|
2342
|
-
this.setEndDate(
|
|
2341
|
+
} else if (this.endDate && this.endDate.hasSame(this.startDate, 'day') && this.endDate < this.startDate) {
|
|
2342
|
+
this.setEndDate(this.startDate, true);
|
|
2343
2343
|
}
|
|
2344
2344
|
} else if (this.endDate) {
|
|
2345
2345
|
let end = this.endDate.set({ hour: hour, minute: minute, second: second });
|