@wernfried/daterangepicker 5.2.14 → 5.2.17
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 +8 -8
- package/dist/cjs/daterangepicker.cjs +10 -4
- package/dist/cjs/daterangepicker.cjs.map +1 -1
- package/dist/cjs/daterangepicker.min.cjs +2 -2
- package/dist/cjs/daterangepicker.min.cjs.map +1 -1
- package/dist/esm/daterangepicker.js +10 -4
- package/dist/esm/daterangepicker.js.map +1 -1
- package/dist/esm/daterangepicker.min.js +2 -2
- package/dist/esm/daterangepicker.min.js.map +1 -1
- package/dist/global/daterangepicker.js +10 -4
- package/dist/global/daterangepicker.js.map +1 -1
- package/dist/global/daterangepicker.min.js +2 -2
- package/dist/global/daterangepicker.min.js.map +1 -1
- package/package.json +2 -2
|
@@ -1089,9 +1089,9 @@ var DateRangePicker = (function(exports, luxon2) {
|
|
|
1089
1089
|
if (endDate < minDate) {
|
|
1090
1090
|
violation = { old: endDate, reason: "minSpan" };
|
|
1091
1091
|
if (this.defaultSpan) {
|
|
1092
|
-
endDate =
|
|
1092
|
+
endDate = startDate.plus({ seconds: Math.trunc(this.defaultSpan.as("seconds") / shiftStep) * shiftStep });
|
|
1093
1093
|
} else {
|
|
1094
|
-
endDate =
|
|
1094
|
+
endDate = startDate.plus({ seconds: Math.trunc(this.minSpan.as("seconds") / shiftStep) * shiftStep });
|
|
1095
1095
|
}
|
|
1096
1096
|
if (endDate < minDate)
|
|
1097
1097
|
endDate = endDate.plus(this.timePicker ? this.timePickerStepSize : { days: 1 });
|
|
@@ -2042,8 +2042,14 @@ var DateRangePicker = (function(exports, luxon2) {
|
|
|
2042
2042
|
this.#startDate = this.#startDate.set({ hour, minute, second });
|
|
2043
2043
|
if (this.singleDatePicker) {
|
|
2044
2044
|
this.#endDate = this.#startDate;
|
|
2045
|
-
} else if (this.#endDate && this.#endDate.hasSame(this.#startDate, "day")
|
|
2046
|
-
this.#endDate
|
|
2045
|
+
} else if (this.#endDate && this.#endDate.hasSame(this.#startDate, "day")) {
|
|
2046
|
+
if (this.defaultSpan && this.#endDate < this.#startDate.plus(this.minSpan)) {
|
|
2047
|
+
this.#endDate = this.#startDate.plus(this.defaultSpan);
|
|
2048
|
+
} else if (this.minSpan && this.#endDate < this.#startDate.plus(this.minSpan)) {
|
|
2049
|
+
this.#endDate = this.#startDate.plus(this.minSpan);
|
|
2050
|
+
} else if (this.#endDate < this.#startDate) {
|
|
2051
|
+
this.#endDate = this.#startDate;
|
|
2052
|
+
}
|
|
2047
2053
|
}
|
|
2048
2054
|
} else if (this.#endDate) {
|
|
2049
2055
|
this.#endDate = this.#endDate.set({ hour, minute, second });
|