@wernfried/daterangepicker 5.7.0 → 5.7.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/API_Doc.md +1 -1
- package/README.md +9 -9
- package/dist/cjs/daterangepicker.cjs +3 -3
- 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 +3 -3
- 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 +3 -3
- 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
|
@@ -415,15 +415,15 @@ class DateRangePicker {
|
|
|
415
415
|
if (this.singleDatePicker) {
|
|
416
416
|
if (typeof options.altInput === "string") {
|
|
417
417
|
const el = document.querySelector(options.altInput);
|
|
418
|
-
this.altInput = el instanceof HTMLInputElement && el.type
|
|
418
|
+
this.altInput = el instanceof HTMLInputElement && ["text", "hidden"].includes(el.type) ? el : null;
|
|
419
419
|
} else if (options.altInput instanceof HTMLElement) {
|
|
420
|
-
this.altInput = options.altInput instanceof HTMLInputElement && options.altInput.type
|
|
420
|
+
this.altInput = options.altInput instanceof HTMLInputElement && ["text", "hidden"].includes(options.altInput.type) ? options.altInput : null;
|
|
421
421
|
}
|
|
422
422
|
} else if (!this.singleDatePicker && Array.isArray(options.altInput) && options.altInput.length === 2) {
|
|
423
423
|
this.altInput = [];
|
|
424
424
|
for (let item of options.altInput) {
|
|
425
425
|
const el = typeof item === "string" ? document.querySelector(item) : item;
|
|
426
|
-
if (el instanceof HTMLInputElement && el.type
|
|
426
|
+
if (el instanceof HTMLInputElement && ["text", "hidden"].includes(el.type))
|
|
427
427
|
this.altInput.push(el);
|
|
428
428
|
}
|
|
429
429
|
if (this.altInput.length !== 2)
|