@wernfried/daterangepicker 5.3.8 → 5.4.1
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 +5 -5
- package/dist/cjs/daterangepicker.cjs.map +1 -1
- package/dist/cjs/daterangepicker.min.cjs +1 -1
- package/dist/cjs/daterangepicker.min.cjs.map +1 -1
- package/dist/esm/daterangepicker.js +5 -5
- package/dist/esm/daterangepicker.js.map +1 -1
- package/dist/esm/daterangepicker.min.js +1 -1
- package/dist/esm/daterangepicker.min.js.map +1 -1
- package/dist/global/daterangepicker.js +5 -5
- package/dist/global/daterangepicker.js.map +1 -1
- package/dist/global/daterangepicker.min.js +1 -1
- package/dist/global/daterangepicker.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -314,12 +314,12 @@ class DateRangePicker {
|
|
|
314
314
|
if (opt === "endDate" && this.singleDatePicker)
|
|
315
315
|
continue;
|
|
316
316
|
if (typeof options[opt] === "object") {
|
|
317
|
-
if (
|
|
317
|
+
if (options[opt] == null) {
|
|
318
|
+
this[opt] = null;
|
|
319
|
+
} else if (DateTime.isDateTime(options[opt])) {
|
|
318
320
|
this[opt] = options[opt];
|
|
319
321
|
} else if (options[opt] instanceof Date) {
|
|
320
322
|
this[opt] = DateTime.fromJSDate(options[opt]);
|
|
321
|
-
} else if (options[opt] === null) {
|
|
322
|
-
this[opt] = null;
|
|
323
323
|
} else {
|
|
324
324
|
console.error(`Option '${opt}' must be a luxon.DateTime or Date or string`);
|
|
325
325
|
}
|
|
@@ -616,7 +616,7 @@ class DateRangePicker {
|
|
|
616
616
|
* // -> Calendar selects and shows "today - 3 days"
|
|
617
617
|
*/
|
|
618
618
|
onViolate: { type: "violate", param: (violation, newDate) => {
|
|
619
|
-
return { ...violation,
|
|
619
|
+
return { ...violation, cancelable: true };
|
|
620
620
|
} },
|
|
621
621
|
/**
|
|
622
622
|
* Emitted before the calendar time picker is rendered.
|
|
@@ -1334,7 +1334,7 @@ class DateRangePicker {
|
|
|
1334
1334
|
html += `<th class="week">${this.locale.weekLabel}</th>`;
|
|
1335
1335
|
for (let [index, dayOfWeek] of this.locale.daysOfWeek.entries()) {
|
|
1336
1336
|
html += "<th";
|
|
1337
|
-
if (this.weekendDayClasses && this.weekendDayClasses.length && Info.getWeekendWeekdays().includes(index
|
|
1337
|
+
if (this.weekendDayClasses && this.weekendDayClasses.length && Info.getWeekendWeekdays().includes(calendar[0][index].weekday))
|
|
1338
1338
|
html += ` class="${this.weekendDayClasses}"`;
|
|
1339
1339
|
html += `>${dayOfWeek}</th>`;
|
|
1340
1340
|
}
|