@syncfusion/ej2-calendars 35.1.37 → 35.1.39

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 : 35.1.37
3
+ * version : 35.1.39
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": "35.1.37",
3
+ "version": "35.1.39",
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",
@@ -12,7 +12,7 @@
12
12
  "@syncfusion/ej2-buttons": "~35.1.37",
13
13
  "@syncfusion/ej2-inputs": "~35.1.37",
14
14
  "@syncfusion/ej2-lists": "~35.1.37",
15
- "@syncfusion/ej2-popups": "~35.1.37"
15
+ "@syncfusion/ej2-popups": "~35.1.39"
16
16
  },
17
17
  "devDependencies": {},
18
18
  "keywords": [
@@ -182,7 +182,7 @@ var CalendarBase = /** @class */ (function (_super) {
182
182
  this.setProperties({ min: this.checkDateValue(new Date(this.checkValue(this.min))) }, true);
183
183
  this.setProperties({ max: this.checkDateValue(new Date(this.checkValue(this.max))) }, true);
184
184
  this.currentDate = this.currentDate ? this.currentDate : new Date(new Date().setHours(0, 0, 0, 0));
185
- if (!isNullOrUndefined(value) && this.min <= this.max && value >= this.min && value <= this.max) {
185
+ if (!isNullOrUndefined(value) && this.min <= this.max && value >= this.min && value <= this.max && !(this.refreshing && this.getModuleName() === 'calendar')) {
186
186
  this.currentDate = new Date(this.checkValue(value));
187
187
  }
188
188
  };
@@ -203,16 +203,18 @@ var CalendarBase = /** @class */ (function (_super) {
203
203
  else {
204
204
  removeClass([this.element], OVERLAY);
205
205
  }
206
- if (+this.min <= +this.max && value && +value <= +this.max && +value >= +this.min) {
207
- this.currentDate = new Date(this.checkValue(value));
208
- }
209
- else {
210
- if (+this.min <= +this.max && !value && +this.currentDate > +this.max) {
211
- this.currentDate = new Date(this.checkValue(this.max));
206
+ if (!(this.refreshing && this.getModuleName() === 'calendar')) {
207
+ if (+this.min <= +this.max && value && +value <= +this.max && +value >= +this.min) {
208
+ this.currentDate = new Date(this.checkValue(value));
212
209
  }
213
210
  else {
214
- if (+this.currentDate < +this.min) {
215
- this.currentDate = new Date(this.checkValue(this.min));
211
+ if (+this.min <= +this.max && !value && +this.currentDate > +this.max) {
212
+ this.currentDate = new Date(this.checkValue(this.max));
213
+ }
214
+ else {
215
+ if (+this.currentDate < +this.min) {
216
+ this.currentDate = new Date(this.checkValue(this.min));
217
+ }
216
218
  }
217
219
  }
218
220
  }
@@ -2300,7 +2302,7 @@ var Calendar = /** @class */ (function (_super) {
2300
2302
  this.setProperties({ value: this.checkDateValue(new Date(this.checkValue(this.value))) }, true); // persist the value property.
2301
2303
  }
2302
2304
  _super.prototype.validateDate.call(this, this.value);
2303
- if (!isNullOrUndefined(this.value) && this.min <= this.max && this.value >= this.min && this.value <= this.max) {
2305
+ if (!isNullOrUndefined(this.value) && this.min <= this.max && this.value >= this.min && this.value <= this.max && !(this.refreshing && this.getModuleName() === 'calendar')) {
2304
2306
  this.currentDate = new Date(this.checkValue(this.value));
2305
2307
  }
2306
2308
  if (isNaN(+this.value)) {
@@ -643,6 +643,7 @@ export declare class DateRangePicker extends CalendarBase {
643
643
  private clear;
644
644
  private windowResize;
645
645
  private rangeIconHandler;
646
+ private inputFocusOutHandler;
646
647
  private checkHtmlAttributes;
647
648
  private createPopup;
648
649
  private renderControl;
@@ -561,6 +561,7 @@ var DateRangePicker = /** @class */ (function (_super) {
561
561
  DateRangePicker.prototype.bindEvents = function () {
562
562
  EventHandler.add(this.inputWrapper.buttons[0], 'mousedown', this.rangeIconHandler, this);
563
563
  EventHandler.add(this.inputElement, 'focus', this.inputFocusHandler, this);
564
+ EventHandler.add(this.inputElement, 'focusout', this.inputFocusOutHandler, this);
564
565
  EventHandler.add(this.inputElement, 'blur', this.inputBlurHandler, this);
565
566
  EventHandler.add(this.inputElement, 'change', this.inputChangeHandler, this);
566
567
  if (this.showClearButton && this.inputWrapper.clearButton) {
@@ -590,6 +591,7 @@ var DateRangePicker = /** @class */ (function (_super) {
590
591
  EventHandler.remove(this.inputWrapper.buttons[0], 'mousedown', this.rangeIconHandler);
591
592
  EventHandler.remove(this.inputElement, 'blur', this.inputBlurHandler);
592
593
  EventHandler.remove(this.inputElement, 'focus', this.inputFocusHandler);
594
+ EventHandler.remove(this.inputElement, 'focusout', this.inputFocusOutHandler);
593
595
  EventHandler.remove(this.inputElement, 'change', this.inputChangeHandler);
594
596
  if (this.showClearButton && this.inputWrapper.clearButton) {
595
597
  EventHandler.remove(this.inputWrapper.clearButton, 'mousedown touchstart', this.resetHandler);
@@ -754,6 +756,11 @@ var DateRangePicker = /** @class */ (function (_super) {
754
756
  addClass([this.inputWrapper.container], [INPUTFOCUS]);
755
757
  }
756
758
  };
759
+ DateRangePicker.prototype.inputFocusOutHandler = function (e) {
760
+ if (this.isIconClick) {
761
+ e.stopImmediatePropagation();
762
+ }
763
+ };
757
764
  DateRangePicker.prototype.checkHtmlAttributes = function (isDynamic) {
758
765
  this.globalize = new Internationalization(this.locale);
759
766
  var attributes = isDynamic ? isNullOrUndefined(this.htmlAttributes) ? [] : Object.keys(this.htmlAttributes) :