@wernfried/daterangepicker 5.4.5 → 5.4.9

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.
@@ -165,6 +165,8 @@ class DateRangePicker {
165
165
  } else if (typeof options.parentEl === "string") {
166
166
  this.parentEl = document.querySelector(options.parentEl) ?? this.parentEl;
167
167
  }
168
+ if (this.parentEl.matches("input"))
169
+ console.error('Parent element "parentEl" must not a self-closing "<input>"');
168
170
  this.parentEl.appendChild(this.container);
169
171
  if (typeof options.timePicker === "boolean")
170
172
  this.timePicker = options.timePicker;
@@ -1604,7 +1606,7 @@ class DateRangePicker {
1604
1606
  top: offset(this.parentEl).top - this.parentEl.scrollTop,
1605
1607
  left: offset(this.parentEl).left - this.parentEl.scrollLeft
1606
1608
  };
1607
- parentRightEdge = this.parentEl[0].clientWidth + offset(this.parentEl).left;
1609
+ parentRightEdge = this.parentEl.clientWidth + parentOffset.left;
1608
1610
  }
1609
1611
  switch (this.drops) {
1610
1612
  case "auto":