@syncfusion/ej2-calendars 26.2.10 → 26.2.11

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.
@@ -6394,12 +6394,15 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
6394
6394
  if (this.depth === 'Month') {
6395
6395
  return this.globalize.parseDate(range[isEnd ? 1 : 0].trim(), dateOptions);
6396
6396
  }
6397
- else if (this.depth === 'Year') {
6397
+ else if (this.depth === 'Year' && !isNullOrUndefined(date)) {
6398
6398
  return new Date(date.getFullYear(), date.getMonth() + (isEnd ? 1 : 0), isEnd ? 0 : 1);
6399
6399
  }
6400
- else {
6400
+ else if (!isNullOrUndefined(date)) {
6401
6401
  return new Date(date.getFullYear(), isEnd ? 11 : 0, isEnd ? 31 : 1);
6402
6402
  }
6403
+ else {
6404
+ return null;
6405
+ }
6403
6406
  };
6404
6407
  DateRangePicker.prototype.clearRange = function () {
6405
6408
  this.previousStartValue = this.previousEndValue = null;
@@ -13138,11 +13141,6 @@ var DateTimePicker = /** @__PURE__ @class */ (function (_super) {
13138
13141
  if (Browser.isDevice && this.fullScreenMode) {
13139
13142
  this.dateTimeWrapper.style.left = '0px';
13140
13143
  }
13141
- if (Browser.isDevice) {
13142
- var dlgOverlay = this.createElement('div', { className: 'e-dlg-overlay' });
13143
- dlgOverlay.style.zIndex = (this.zIndex - 1).toString();
13144
- this.timeModal.appendChild(dlgOverlay);
13145
- }
13146
13144
  }
13147
13145
  }
13148
13146
  };
@@ -13212,12 +13210,12 @@ var DateTimePicker = /** @__PURE__ @class */ (function (_super) {
13212
13210
  document.body.appendChild(this.timeModal);
13213
13211
  }
13214
13212
  if (Browser.isDevice) {
13215
- var modelWrapper = createElement('div', { className: 'e-datetime-mob-popup-wrap' });
13216
- modelWrapper.appendChild(this.dateTimeWrapper);
13213
+ this.modelWrapper = createElement('div', { className: 'e-datetime-mob-popup-wrap' });
13214
+ this.modelWrapper.appendChild(this.dateTimeWrapper);
13217
13215
  var dlgOverlay = createElement('div', { className: 'e-dlg-overlay' });
13218
13216
  dlgOverlay.style.zIndex = (this.zIndex - 1).toString();
13219
- modelWrapper.appendChild(dlgOverlay);
13220
- document.body.appendChild(modelWrapper);
13217
+ this.modelWrapper.appendChild(dlgOverlay);
13218
+ document.body.appendChild(this.modelWrapper);
13221
13219
  }
13222
13220
  var offset = 4;
13223
13221
  this.popupObject = new Popup(this.dateTimeWrapper, {
@@ -13247,6 +13245,9 @@ var DateTimePicker = /** @__PURE__ @class */ (function (_super) {
13247
13245
  remove(_this.popupObject.element);
13248
13246
  _this.popupObject.destroy();
13249
13247
  _this.dateTimeWrapper.innerHTML = '';
13248
+ if (_this.modelWrapper) {
13249
+ remove(_this.modelWrapper);
13250
+ }
13250
13251
  _this.listWrapper = _this.dateTimeWrapper = undefined;
13251
13252
  if (_this.inputEvent) {
13252
13253
  _this.inputEvent.destroy();