@syncfusion/ej2-calendars 34.2.4 → 34.2.6

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.
@@ -3747,6 +3747,8 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
3747
3747
  keyAction: this.inputKeyActionHandle.bind(this),
3748
3748
  keyConfigs: this.defaultKeyConfigs
3749
3749
  });
3750
+ this.resizeHandler = this.windowResize.bind(this);
3751
+ window.addEventListener('resize', this.resizeHandler);
3750
3752
  };
3751
3753
  DatePicker.prototype.keydownHandler = function (e) {
3752
3754
  switch (e.code) {
@@ -3788,6 +3790,10 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
3788
3790
  if (this.formElement) {
3789
3791
  EventHandler.remove(this.formElement, 'reset', this.resetFormHandler);
3790
3792
  }
3793
+ if (this.resizeHandler) {
3794
+ window.removeEventListener('resize', this.resizeHandler);
3795
+ this.resizeHandler = null;
3796
+ }
3791
3797
  };
3792
3798
  DatePicker.prototype.resetFormHandler = function () {
3793
3799
  if (!this.enabled) {
@@ -3878,6 +3884,9 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
3878
3884
  DatePicker.prototype.updateInputValue = function (value) {
3879
3885
  Input.setValue(value, this.inputElement, this.floatLabelType, this.showClearButton);
3880
3886
  };
3887
+ DatePicker.prototype.windowResize = function () {
3888
+ this.updateFloatLabelOverflowWidth(true);
3889
+ };
3881
3890
  DatePicker.prototype.dateIconHandler = function (e) {
3882
3891
  if (!this.enabled) {
3883
3892
  return;
@@ -5239,13 +5248,17 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
5239
5248
  }
5240
5249
  return document.body;
5241
5250
  };
5242
- DatePicker.prototype.updateFloatLabelOverflowWidth = function () {
5251
+ DatePicker.prototype.updateFloatLabelOverflowWidth = function (isDynamic) {
5243
5252
  var container = this.inputWrapper.container;
5244
- var label = container.querySelector('.e-float-text.e-label-bottom');
5253
+ var label = isDynamic ?
5254
+ container.querySelector('.e-float-text') : container.querySelector('.e-float-text.e-label-bottom');
5245
5255
  var width = 0;
5246
5256
  var iconSelectors = '.e-input-group-icon, .e-clear-icon';
5247
5257
  var icons = container.querySelectorAll(iconSelectors);
5248
5258
  for (var index = 0; index < icons.length; index++) {
5259
+ if (isDynamic && icons[index].classList.contains('e-time-icon')) {
5260
+ continue;
5261
+ }
5249
5262
  width += icons[index].offsetWidth;
5250
5263
  }
5251
5264
  if (label) {
@@ -6213,6 +6226,8 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
6213
6226
  else {
6214
6227
  this.inputElement.tabIndex = -1;
6215
6228
  }
6229
+ this.resizeHandler = this.windowResize.bind(this);
6230
+ window.addEventListener('resize', this.resizeHandler);
6216
6231
  };
6217
6232
  DateRangePicker.prototype.unBindEvents = function () {
6218
6233
  EventHandler.remove(this.inputWrapper.buttons[0], 'mousedown', this.rangeIconHandler);
@@ -6231,6 +6246,10 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
6231
6246
  EventHandler.remove(this.formElement, 'reset', this.formResetHandler);
6232
6247
  }
6233
6248
  this.inputElement.tabIndex = -1;
6249
+ if (this.resizeHandler) {
6250
+ window.removeEventListener('resize', this.resizeHandler);
6251
+ this.resizeHandler = null;
6252
+ }
6234
6253
  };
6235
6254
  DateRangePicker.prototype.updateHiddenInput = function () {
6236
6255
  if (this.firstHiddenChild && this.secondHiddenChild) {
@@ -6349,6 +6368,9 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
6349
6368
  }
6350
6369
  this.removeSelection();
6351
6370
  };
6371
+ DateRangePicker.prototype.windowResize = function () {
6372
+ this.updateFloatLabelOverflowWidth(true);
6373
+ };
6352
6374
  DateRangePicker.prototype.rangeIconHandler = function (e) {
6353
6375
  if (!this.enabled) {
6354
6376
  return;
@@ -9789,9 +9811,10 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
9789
9811
  }
9790
9812
  return document.body;
9791
9813
  };
9792
- DateRangePicker.prototype.updateFloatLabelOverflowWidth = function () {
9814
+ DateRangePicker.prototype.updateFloatLabelOverflowWidth = function (isDynamic) {
9793
9815
  var container = this.inputWrapper.container;
9794
- var label = container.querySelector('.e-float-text.e-label-bottom');
9816
+ var label = isDynamic ?
9817
+ container.querySelector('.e-float-text') : container.querySelector('.e-float-text.e-label-bottom');
9795
9818
  var width = 0;
9796
9819
  var iconSelectors = '.e-input-group-icon, .e-clear-icon';
9797
9820
  var icons = container.querySelectorAll(iconSelectors);