@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.
@@ -180,7 +180,7 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
180
180
  this.setProperties({ min: this.checkDateValue(new Date(this.checkValue(this.min))) }, true);
181
181
  this.setProperties({ max: this.checkDateValue(new Date(this.checkValue(this.max))) }, true);
182
182
  this.currentDate = this.currentDate ? this.currentDate : new Date(new Date().setHours(0, 0, 0, 0));
183
- if (!isNullOrUndefined(value) && this.min <= this.max && value >= this.min && value <= this.max) {
183
+ if (!isNullOrUndefined(value) && this.min <= this.max && value >= this.min && value <= this.max && !(this.refreshing && this.getModuleName() === 'calendar')) {
184
184
  this.currentDate = new Date(this.checkValue(value));
185
185
  }
186
186
  };
@@ -201,16 +201,18 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
201
201
  else {
202
202
  removeClass([this.element], OVERLAY);
203
203
  }
204
- if (+this.min <= +this.max && value && +value <= +this.max && +value >= +this.min) {
205
- this.currentDate = new Date(this.checkValue(value));
206
- }
207
- else {
208
- if (+this.min <= +this.max && !value && +this.currentDate > +this.max) {
209
- this.currentDate = new Date(this.checkValue(this.max));
204
+ if (!(this.refreshing && this.getModuleName() === 'calendar')) {
205
+ if (+this.min <= +this.max && value && +value <= +this.max && +value >= +this.min) {
206
+ this.currentDate = new Date(this.checkValue(value));
210
207
  }
211
208
  else {
212
- if (+this.currentDate < +this.min) {
213
- this.currentDate = new Date(this.checkValue(this.min));
209
+ if (+this.min <= +this.max && !value && +this.currentDate > +this.max) {
210
+ this.currentDate = new Date(this.checkValue(this.max));
211
+ }
212
+ else {
213
+ if (+this.currentDate < +this.min) {
214
+ this.currentDate = new Date(this.checkValue(this.min));
215
+ }
214
216
  }
215
217
  }
216
218
  }
@@ -2297,7 +2299,7 @@ var Calendar = /** @__PURE__ @class */ (function (_super) {
2297
2299
  this.setProperties({ value: this.checkDateValue(new Date(this.checkValue(this.value))) }, true); // persist the value property.
2298
2300
  }
2299
2301
  _super.prototype.validateDate.call(this, this.value);
2300
- if (!isNullOrUndefined(this.value) && this.min <= this.max && this.value >= this.min && this.value <= this.max) {
2302
+ if (!isNullOrUndefined(this.value) && this.min <= this.max && this.value >= this.min && this.value <= this.max && !(this.refreshing && this.getModuleName() === 'calendar')) {
2301
2303
  this.currentDate = new Date(this.checkValue(this.value));
2302
2304
  }
2303
2305
  if (isNaN(+this.value)) {
@@ -6207,6 +6209,7 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
6207
6209
  DateRangePicker.prototype.bindEvents = function () {
6208
6210
  EventHandler.add(this.inputWrapper.buttons[0], 'mousedown', this.rangeIconHandler, this);
6209
6211
  EventHandler.add(this.inputElement, 'focus', this.inputFocusHandler, this);
6212
+ EventHandler.add(this.inputElement, 'focusout', this.inputFocusOutHandler, this);
6210
6213
  EventHandler.add(this.inputElement, 'blur', this.inputBlurHandler, this);
6211
6214
  EventHandler.add(this.inputElement, 'change', this.inputChangeHandler, this);
6212
6215
  if (this.showClearButton && this.inputWrapper.clearButton) {
@@ -6236,6 +6239,7 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
6236
6239
  EventHandler.remove(this.inputWrapper.buttons[0], 'mousedown', this.rangeIconHandler);
6237
6240
  EventHandler.remove(this.inputElement, 'blur', this.inputBlurHandler);
6238
6241
  EventHandler.remove(this.inputElement, 'focus', this.inputFocusHandler);
6242
+ EventHandler.remove(this.inputElement, 'focusout', this.inputFocusOutHandler);
6239
6243
  EventHandler.remove(this.inputElement, 'change', this.inputChangeHandler);
6240
6244
  if (this.showClearButton && this.inputWrapper.clearButton) {
6241
6245
  EventHandler.remove(this.inputWrapper.clearButton, 'mousedown touchstart', this.resetHandler);
@@ -6400,6 +6404,11 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
6400
6404
  addClass([this.inputWrapper.container], [INPUTFOCUS$1]);
6401
6405
  }
6402
6406
  };
6407
+ DateRangePicker.prototype.inputFocusOutHandler = function (e) {
6408
+ if (this.isIconClick) {
6409
+ e.stopImmediatePropagation();
6410
+ }
6411
+ };
6403
6412
  DateRangePicker.prototype.checkHtmlAttributes = function (isDynamic) {
6404
6413
  this.globalize = new Internationalization(this.locale);
6405
6414
  var attributes = isDynamic ? isNullOrUndefined(this.htmlAttributes) ? [] : Object.keys(this.htmlAttributes) :