@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.
@@ -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 === "text" ? el : null;
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 === "text" ? options.altInput : null;
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 === "text")
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)