@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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 34.2.4
3
+ * version : 34.2.6
4
4
  * Copyright Syncfusion Inc. 2001 - 2025. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syncfusion/ej2-calendars",
3
- "version": "34.2.4",
3
+ "version": "34.2.6",
4
4
  "description": "A complete package of date or time components with built-in features such as date formatting, inline editing, multiple (range) selection, range restriction, month and year selection, strict mode, and globalization.",
5
5
  "author": "Syncfusion Inc.",
6
6
  "license": "SEE LICENSE IN license",
@@ -8,11 +8,11 @@
8
8
  "module": "./index.js",
9
9
  "es2015": "./dist/es6/ej2-calendars.es5.js",
10
10
  "dependencies": {
11
- "@syncfusion/ej2-base": "~34.2.4",
12
- "@syncfusion/ej2-buttons": "~34.2.2",
13
- "@syncfusion/ej2-inputs": "~34.2.2",
14
- "@syncfusion/ej2-lists": "~34.2.2",
15
- "@syncfusion/ej2-popups": "~34.2.4"
11
+ "@syncfusion/ej2-base": "~34.2.6",
12
+ "@syncfusion/ej2-buttons": "~34.2.6",
13
+ "@syncfusion/ej2-inputs": "~34.2.6",
14
+ "@syncfusion/ej2-lists": "~34.2.6",
15
+ "@syncfusion/ej2-popups": "~34.2.6"
16
16
  },
17
17
  "devDependencies": {},
18
18
  "keywords": [
@@ -70,6 +70,7 @@ export declare class DatePicker extends Calendar implements IInput {
70
70
  protected isBlur: boolean;
71
71
  private isKeyAction;
72
72
  private initTimeZone;
73
+ private resizeHandler;
73
74
  protected clearButton: HTMLElement;
74
75
  /**
75
76
  * Specifies the width of the DatePicker component.
@@ -437,6 +438,7 @@ export declare class DatePicker extends Calendar implements IInput {
437
438
  private clear;
438
439
  private preventEventBubbling;
439
440
  private updateInputValue;
441
+ private windowResize;
440
442
  private dateIconHandler;
441
443
  protected updateHtmlAttributeToWrapper(): void;
442
444
  private getDeviceType;
@@ -440,6 +440,8 @@ var DatePicker = /** @class */ (function (_super) {
440
440
  keyAction: this.inputKeyActionHandle.bind(this),
441
441
  keyConfigs: this.defaultKeyConfigs
442
442
  });
443
+ this.resizeHandler = this.windowResize.bind(this);
444
+ window.addEventListener('resize', this.resizeHandler);
443
445
  };
444
446
  DatePicker.prototype.keydownHandler = function (e) {
445
447
  switch (e.code) {
@@ -483,6 +485,10 @@ var DatePicker = /** @class */ (function (_super) {
483
485
  if (this.formElement) {
484
486
  EventHandler.remove(this.formElement, 'reset', this.resetFormHandler);
485
487
  }
488
+ if (this.resizeHandler) {
489
+ window.removeEventListener('resize', this.resizeHandler);
490
+ this.resizeHandler = null;
491
+ }
486
492
  };
487
493
  DatePicker.prototype.resetFormHandler = function () {
488
494
  if (!this.enabled) {
@@ -573,6 +579,9 @@ var DatePicker = /** @class */ (function (_super) {
573
579
  DatePicker.prototype.updateInputValue = function (value) {
574
580
  Input.setValue(value, this.inputElement, this.floatLabelType, this.showClearButton);
575
581
  };
582
+ DatePicker.prototype.windowResize = function () {
583
+ this.updateFloatLabelOverflowWidth(true);
584
+ };
576
585
  DatePicker.prototype.dateIconHandler = function (e) {
577
586
  if (!this.enabled) {
578
587
  return;
@@ -1938,13 +1947,17 @@ var DatePicker = /** @class */ (function (_super) {
1938
1947
  }
1939
1948
  return document.body;
1940
1949
  };
1941
- DatePicker.prototype.updateFloatLabelOverflowWidth = function () {
1950
+ DatePicker.prototype.updateFloatLabelOverflowWidth = function (isDynamic) {
1942
1951
  var container = this.inputWrapper.container;
1943
- var label = container.querySelector('.e-float-text.e-label-bottom');
1952
+ var label = isDynamic ?
1953
+ container.querySelector('.e-float-text') : container.querySelector('.e-float-text.e-label-bottom');
1944
1954
  var width = 0;
1945
1955
  var iconSelectors = '.e-input-group-icon, .e-clear-icon';
1946
1956
  var icons = container.querySelectorAll(iconSelectors);
1947
1957
  for (var index = 0; index < icons.length; index++) {
1958
+ if (isDynamic && icons[index].classList.contains('e-time-icon')) {
1959
+ continue;
1960
+ }
1948
1961
  width += icons[index].offsetWidth;
1949
1962
  }
1950
1963
  if (label) {
@@ -175,6 +175,7 @@ export declare class DateRangePicker extends CalendarBase {
175
175
  protected iconRangeRight: string;
176
176
  protected clearButton: HTMLElement;
177
177
  private isIconClick;
178
+ private resizeHandler;
178
179
  /**
179
180
  * Gets or sets the start and end date of the Calendar.
180
181
  * {% codeBlock src='daterangepicker/value/index.md' %}{% endcodeBlock %}
@@ -641,6 +642,7 @@ export declare class DateRangePicker extends CalendarBase {
641
642
  private restoreValue;
642
643
  protected formResetHandler(e: MouseEvent): void;
643
644
  private clear;
645
+ private windowResize;
644
646
  private rangeIconHandler;
645
647
  private checkHtmlAttributes;
646
648
  private createPopup;
@@ -583,6 +583,8 @@ var DateRangePicker = /** @class */ (function (_super) {
583
583
  else {
584
584
  this.inputElement.tabIndex = -1;
585
585
  }
586
+ this.resizeHandler = this.windowResize.bind(this);
587
+ window.addEventListener('resize', this.resizeHandler);
586
588
  };
587
589
  DateRangePicker.prototype.unBindEvents = function () {
588
590
  EventHandler.remove(this.inputWrapper.buttons[0], 'mousedown', this.rangeIconHandler);
@@ -601,6 +603,10 @@ var DateRangePicker = /** @class */ (function (_super) {
601
603
  EventHandler.remove(this.formElement, 'reset', this.formResetHandler);
602
604
  }
603
605
  this.inputElement.tabIndex = -1;
606
+ if (this.resizeHandler) {
607
+ window.removeEventListener('resize', this.resizeHandler);
608
+ this.resizeHandler = null;
609
+ }
604
610
  };
605
611
  DateRangePicker.prototype.updateHiddenInput = function () {
606
612
  if (this.firstHiddenChild && this.secondHiddenChild) {
@@ -719,6 +725,9 @@ var DateRangePicker = /** @class */ (function (_super) {
719
725
  }
720
726
  this.removeSelection();
721
727
  };
728
+ DateRangePicker.prototype.windowResize = function () {
729
+ this.updateFloatLabelOverflowWidth(true);
730
+ };
722
731
  DateRangePicker.prototype.rangeIconHandler = function (e) {
723
732
  if (!this.enabled) {
724
733
  return;
@@ -4163,9 +4172,10 @@ var DateRangePicker = /** @class */ (function (_super) {
4163
4172
  }
4164
4173
  return document.body;
4165
4174
  };
4166
- DateRangePicker.prototype.updateFloatLabelOverflowWidth = function () {
4175
+ DateRangePicker.prototype.updateFloatLabelOverflowWidth = function (isDynamic) {
4167
4176
  var container = this.inputWrapper.container;
4168
- var label = container.querySelector('.e-float-text.e-label-bottom');
4177
+ var label = isDynamic ?
4178
+ container.querySelector('.e-float-text') : container.querySelector('.e-float-text.e-label-bottom');
4169
4179
  var width = 0;
4170
4180
  var iconSelectors = '.e-input-group-icon, .e-clear-icon';
4171
4181
  var icons = container.querySelectorAll(iconSelectors);