@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.
@@ -3706,6 +3706,8 @@ let DatePicker = class DatePicker extends Calendar {
3706
3706
  keyAction: this.inputKeyActionHandle.bind(this),
3707
3707
  keyConfigs: this.defaultKeyConfigs
3708
3708
  });
3709
+ this.resizeHandler = this.windowResize.bind(this);
3710
+ window.addEventListener('resize', this.resizeHandler);
3709
3711
  }
3710
3712
  keydownHandler(e) {
3711
3713
  switch (e.code) {
@@ -3747,6 +3749,10 @@ let DatePicker = class DatePicker extends Calendar {
3747
3749
  if (this.formElement) {
3748
3750
  EventHandler.remove(this.formElement, 'reset', this.resetFormHandler);
3749
3751
  }
3752
+ if (this.resizeHandler) {
3753
+ window.removeEventListener('resize', this.resizeHandler);
3754
+ this.resizeHandler = null;
3755
+ }
3750
3756
  }
3751
3757
  resetFormHandler() {
3752
3758
  if (!this.enabled) {
@@ -3837,6 +3843,9 @@ let DatePicker = class DatePicker extends Calendar {
3837
3843
  updateInputValue(value) {
3838
3844
  Input.setValue(value, this.inputElement, this.floatLabelType, this.showClearButton);
3839
3845
  }
3846
+ windowResize() {
3847
+ this.updateFloatLabelOverflowWidth(true);
3848
+ }
3840
3849
  dateIconHandler(e) {
3841
3850
  if (!this.enabled) {
3842
3851
  return;
@@ -3853,6 +3862,9 @@ let DatePicker = class DatePicker extends Calendar {
3853
3862
  }
3854
3863
  else {
3855
3864
  this.isDateIconClicked = true;
3865
+ if (this.getModuleName() === 'datetimepicker') {
3866
+ this.strictModeUpdate();
3867
+ }
3856
3868
  this.show(null, e);
3857
3869
  if (this.getModuleName() === 'datetimepicker') {
3858
3870
  this.inputElement.focus();
@@ -5188,13 +5200,17 @@ let DatePicker = class DatePicker extends Calendar {
5188
5200
  }
5189
5201
  return document.body;
5190
5202
  }
5191
- updateFloatLabelOverflowWidth() {
5203
+ updateFloatLabelOverflowWidth(isDynamic) {
5192
5204
  const container = this.inputWrapper.container;
5193
- const label = container.querySelector('.e-float-text.e-label-bottom');
5205
+ const label = isDynamic ?
5206
+ container.querySelector('.e-float-text') : container.querySelector('.e-float-text.e-label-bottom');
5194
5207
  let width = 0;
5195
5208
  const iconSelectors = '.e-input-group-icon, .e-clear-icon';
5196
5209
  const icons = container.querySelectorAll(iconSelectors);
5197
5210
  for (let index = 0; index < icons.length; index++) {
5211
+ if (isDynamic && icons[index].classList.contains('e-time-icon')) {
5212
+ continue;
5213
+ }
5198
5214
  width += icons[index].offsetWidth;
5199
5215
  }
5200
5216
  if (label) {
@@ -6133,6 +6149,8 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
6133
6149
  else {
6134
6150
  this.inputElement.tabIndex = -1;
6135
6151
  }
6152
+ this.resizeHandler = this.windowResize.bind(this);
6153
+ window.addEventListener('resize', this.resizeHandler);
6136
6154
  }
6137
6155
  unBindEvents() {
6138
6156
  EventHandler.remove(this.inputWrapper.buttons[0], 'mousedown', this.rangeIconHandler);
@@ -6151,6 +6169,10 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
6151
6169
  EventHandler.remove(this.formElement, 'reset', this.formResetHandler);
6152
6170
  }
6153
6171
  this.inputElement.tabIndex = -1;
6172
+ if (this.resizeHandler) {
6173
+ window.removeEventListener('resize', this.resizeHandler);
6174
+ this.resizeHandler = null;
6175
+ }
6154
6176
  }
6155
6177
  updateHiddenInput() {
6156
6178
  if (this.firstHiddenChild && this.secondHiddenChild) {
@@ -6269,6 +6291,9 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
6269
6291
  }
6270
6292
  this.removeSelection();
6271
6293
  }
6294
+ windowResize() {
6295
+ this.updateFloatLabelOverflowWidth(true);
6296
+ }
6272
6297
  rangeIconHandler(e) {
6273
6298
  if (!this.enabled) {
6274
6299
  return;
@@ -9689,9 +9714,10 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
9689
9714
  }
9690
9715
  return document.body;
9691
9716
  }
9692
- updateFloatLabelOverflowWidth() {
9717
+ updateFloatLabelOverflowWidth(isDynamic) {
9693
9718
  const container = this.inputWrapper.container;
9694
- const label = container.querySelector('.e-float-text.e-label-bottom');
9719
+ const label = isDynamic ?
9720
+ container.querySelector('.e-float-text') : container.querySelector('.e-float-text.e-label-bottom');
9695
9721
  let width = 0;
9696
9722
  const iconSelectors = '.e-input-group-icon, .e-clear-icon';
9697
9723
  const icons = container.querySelectorAll(iconSelectors);
@@ -13544,6 +13570,7 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
13544
13570
  }
13545
13571
  else {
13546
13572
  this.inputElement.focus();
13573
+ this.strictModeUpdate();
13547
13574
  this.popupCreation('time', e);
13548
13575
  addClass([this.inputWrapper.container], [INPUTFOCUS$2]);
13549
13576
  }