@syncfusion/ej2-calendars 34.2.5 → 34.2.8

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;
@@ -3894,6 +3903,9 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
3894
3903
  }
3895
3904
  else {
3896
3905
  this.isDateIconClicked = true;
3906
+ if (this.getModuleName() === 'datetimepicker') {
3907
+ this.strictModeUpdate();
3908
+ }
3897
3909
  this.show(null, e);
3898
3910
  if (this.getModuleName() === 'datetimepicker') {
3899
3911
  this.inputElement.focus();
@@ -5239,13 +5251,17 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
5239
5251
  }
5240
5252
  return document.body;
5241
5253
  };
5242
- DatePicker.prototype.updateFloatLabelOverflowWidth = function () {
5254
+ DatePicker.prototype.updateFloatLabelOverflowWidth = function (isDynamic) {
5243
5255
  var container = this.inputWrapper.container;
5244
- var label = container.querySelector('.e-float-text.e-label-bottom');
5256
+ var label = isDynamic ?
5257
+ container.querySelector('.e-float-text') : container.querySelector('.e-float-text.e-label-bottom');
5245
5258
  var width = 0;
5246
5259
  var iconSelectors = '.e-input-group-icon, .e-clear-icon';
5247
5260
  var icons = container.querySelectorAll(iconSelectors);
5248
5261
  for (var index = 0; index < icons.length; index++) {
5262
+ if (isDynamic && icons[index].classList.contains('e-time-icon')) {
5263
+ continue;
5264
+ }
5249
5265
  width += icons[index].offsetWidth;
5250
5266
  }
5251
5267
  if (label) {
@@ -6213,6 +6229,8 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
6213
6229
  else {
6214
6230
  this.inputElement.tabIndex = -1;
6215
6231
  }
6232
+ this.resizeHandler = this.windowResize.bind(this);
6233
+ window.addEventListener('resize', this.resizeHandler);
6216
6234
  };
6217
6235
  DateRangePicker.prototype.unBindEvents = function () {
6218
6236
  EventHandler.remove(this.inputWrapper.buttons[0], 'mousedown', this.rangeIconHandler);
@@ -6231,6 +6249,10 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
6231
6249
  EventHandler.remove(this.formElement, 'reset', this.formResetHandler);
6232
6250
  }
6233
6251
  this.inputElement.tabIndex = -1;
6252
+ if (this.resizeHandler) {
6253
+ window.removeEventListener('resize', this.resizeHandler);
6254
+ this.resizeHandler = null;
6255
+ }
6234
6256
  };
6235
6257
  DateRangePicker.prototype.updateHiddenInput = function () {
6236
6258
  if (this.firstHiddenChild && this.secondHiddenChild) {
@@ -6349,6 +6371,9 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
6349
6371
  }
6350
6372
  this.removeSelection();
6351
6373
  };
6374
+ DateRangePicker.prototype.windowResize = function () {
6375
+ this.updateFloatLabelOverflowWidth(true);
6376
+ };
6352
6377
  DateRangePicker.prototype.rangeIconHandler = function (e) {
6353
6378
  if (!this.enabled) {
6354
6379
  return;
@@ -9789,9 +9814,10 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
9789
9814
  }
9790
9815
  return document.body;
9791
9816
  };
9792
- DateRangePicker.prototype.updateFloatLabelOverflowWidth = function () {
9817
+ DateRangePicker.prototype.updateFloatLabelOverflowWidth = function (isDynamic) {
9793
9818
  var container = this.inputWrapper.container;
9794
- var label = container.querySelector('.e-float-text.e-label-bottom');
9819
+ var label = isDynamic ?
9820
+ container.querySelector('.e-float-text') : container.querySelector('.e-float-text.e-label-bottom');
9795
9821
  var width = 0;
9796
9822
  var iconSelectors = '.e-input-group-icon, .e-clear-icon';
9797
9823
  var icons = container.querySelectorAll(iconSelectors);
@@ -13693,6 +13719,7 @@ var DateTimePicker = /** @__PURE__ @class */ (function (_super) {
13693
13719
  }
13694
13720
  else {
13695
13721
  this.inputElement.focus();
13722
+ this.strictModeUpdate();
13696
13723
  this.popupCreation('time', e);
13697
13724
  addClass([this.inputWrapper.container], [INPUTFOCUS$2]);
13698
13725
  }