@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.
@@ -6318,12 +6318,15 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
6318
6318
  if (this.depth === 'Month') {
6319
6319
  return this.globalize.parseDate(range[isEnd ? 1 : 0].trim(), dateOptions);
6320
6320
  }
6321
- else if (this.depth === 'Year') {
6321
+ else if (this.depth === 'Year' && !isNullOrUndefined(date)) {
6322
6322
  return new Date(date.getFullYear(), date.getMonth() + (isEnd ? 1 : 0), isEnd ? 0 : 1);
6323
6323
  }
6324
- else {
6324
+ else if (!isNullOrUndefined(date)) {
6325
6325
  return new Date(date.getFullYear(), isEnd ? 11 : 0, isEnd ? 31 : 1);
6326
6326
  }
6327
+ else {
6328
+ return null;
6329
+ }
6327
6330
  }
6328
6331
  clearRange() {
6329
6332
  this.previousStartValue = this.previousEndValue = null;
@@ -12996,11 +12999,6 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
12996
12999
  if (Browser.isDevice && this.fullScreenMode) {
12997
13000
  this.dateTimeWrapper.style.left = '0px';
12998
13001
  }
12999
- if (Browser.isDevice) {
13000
- const dlgOverlay = this.createElement('div', { className: 'e-dlg-overlay' });
13001
- dlgOverlay.style.zIndex = (this.zIndex - 1).toString();
13002
- this.timeModal.appendChild(dlgOverlay);
13003
- }
13004
13002
  }
13005
13003
  }
13006
13004
  }
@@ -13068,12 +13066,12 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
13068
13066
  document.body.appendChild(this.timeModal);
13069
13067
  }
13070
13068
  if (Browser.isDevice) {
13071
- const modelWrapper = createElement('div', { className: 'e-datetime-mob-popup-wrap' });
13072
- modelWrapper.appendChild(this.dateTimeWrapper);
13069
+ this.modelWrapper = createElement('div', { className: 'e-datetime-mob-popup-wrap' });
13070
+ this.modelWrapper.appendChild(this.dateTimeWrapper);
13073
13071
  const dlgOverlay = createElement('div', { className: 'e-dlg-overlay' });
13074
13072
  dlgOverlay.style.zIndex = (this.zIndex - 1).toString();
13075
- modelWrapper.appendChild(dlgOverlay);
13076
- document.body.appendChild(modelWrapper);
13073
+ this.modelWrapper.appendChild(dlgOverlay);
13074
+ document.body.appendChild(this.modelWrapper);
13077
13075
  }
13078
13076
  const offset = 4;
13079
13077
  this.popupObject = new Popup(this.dateTimeWrapper, {
@@ -13103,6 +13101,9 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
13103
13101
  remove(this.popupObject.element);
13104
13102
  this.popupObject.destroy();
13105
13103
  this.dateTimeWrapper.innerHTML = '';
13104
+ if (this.modelWrapper) {
13105
+ remove(this.modelWrapper);
13106
+ }
13106
13107
  this.listWrapper = this.dateTimeWrapper = undefined;
13107
13108
  if (this.inputEvent) {
13108
13109
  this.inputEvent.destroy();