@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
|
@@ -416,15 +416,15 @@ var DateRangePicker = (function(exports, luxon2) {
|
|
|
416
416
|
if (this.singleDatePicker) {
|
|
417
417
|
if (typeof options.altInput === "string") {
|
|
418
418
|
const el = document.querySelector(options.altInput);
|
|
419
|
-
this.altInput = el instanceof HTMLInputElement && el.type
|
|
419
|
+
this.altInput = el instanceof HTMLInputElement && ["text", "hidden"].includes(el.type) ? el : null;
|
|
420
420
|
} else if (options.altInput instanceof HTMLElement) {
|
|
421
|
-
this.altInput = options.altInput instanceof HTMLInputElement && options.altInput.type
|
|
421
|
+
this.altInput = options.altInput instanceof HTMLInputElement && ["text", "hidden"].includes(options.altInput.type) ? options.altInput : null;
|
|
422
422
|
}
|
|
423
423
|
} else if (!this.singleDatePicker && Array.isArray(options.altInput) && options.altInput.length === 2) {
|
|
424
424
|
this.altInput = [];
|
|
425
425
|
for (let item of options.altInput) {
|
|
426
426
|
const el = typeof item === "string" ? document.querySelector(item) : item;
|
|
427
|
-
if (el instanceof HTMLInputElement && el.type
|
|
427
|
+
if (el instanceof HTMLInputElement && ["text", "hidden"].includes(el.type))
|
|
428
428
|
this.altInput.push(el);
|
|
429
429
|
}
|
|
430
430
|
if (this.altInput.length !== 2)
|