@syncfusion/ej2-calendars 26.2.10 → 26.2.12

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;
@@ -12993,13 +12996,11 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
12993
12996
  if (!Browser.isDevice || (Browser.isDevice && !this.fullScreenMode)) {
12994
12997
  this.popupObject.refreshPosition(this.inputElement);
12995
12998
  }
12996
- if (Browser.isDevice && this.fullScreenMode) {
12997
- this.dateTimeWrapper.style.left = '0px';
12998
- }
12999
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);
13000
+ this.modelWrapper.style.zIndex = (this.popupObject.zIndex - 1).toString();
13001
+ if (this.fullScreenMode) {
13002
+ this.dateTimeWrapper.style.left = '0px';
13003
+ }
13003
13004
  }
13004
13005
  }
13005
13006
  }
@@ -13068,12 +13069,12 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
13068
13069
  document.body.appendChild(this.timeModal);
13069
13070
  }
13070
13071
  if (Browser.isDevice) {
13071
- const modelWrapper = createElement('div', { className: 'e-datetime-mob-popup-wrap' });
13072
- modelWrapper.appendChild(this.dateTimeWrapper);
13072
+ this.modelWrapper = createElement('div', { className: 'e-datetime-mob-popup-wrap' });
13073
+ this.modelWrapper.appendChild(this.dateTimeWrapper);
13073
13074
  const dlgOverlay = createElement('div', { className: 'e-dlg-overlay' });
13074
13075
  dlgOverlay.style.zIndex = (this.zIndex - 1).toString();
13075
- modelWrapper.appendChild(dlgOverlay);
13076
- document.body.appendChild(modelWrapper);
13076
+ this.modelWrapper.appendChild(dlgOverlay);
13077
+ document.body.appendChild(this.modelWrapper);
13077
13078
  }
13078
13079
  const offset = 4;
13079
13080
  this.popupObject = new Popup(this.dateTimeWrapper, {
@@ -13103,6 +13104,9 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
13103
13104
  remove(this.popupObject.element);
13104
13105
  this.popupObject.destroy();
13105
13106
  this.dateTimeWrapper.innerHTML = '';
13107
+ if (this.modelWrapper) {
13108
+ remove(this.modelWrapper);
13109
+ }
13106
13110
  this.listWrapper = this.dateTimeWrapper = undefined;
13107
13111
  if (this.inputEvent) {
13108
13112
  this.inputEvent.destroy();