@syncfusion/ej2-calendars 23.1.38 → 23.1.41

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.
@@ -2271,7 +2271,7 @@ let Calendar = class Calendar extends CalendarBase {
2271
2271
  this.islamicModule.islamicRenderTemplate(elements, count, classNm, e, this.value);
2272
2272
  }
2273
2273
  this.changedArgs = { value: this.value, values: this.values };
2274
- this.changeHandler();
2274
+ e && e.type === 'click' && e.currentTarget.classList.contains(OTHERMONTH) ? this.changeHandler(e) : this.changeHandler();
2275
2275
  }
2276
2276
  clickHandler(e) {
2277
2277
  const eve = e.currentTarget;
@@ -3300,7 +3300,7 @@ let DatePicker = class DatePicker extends Calendar {
3300
3300
  const ariaAttrs = {
3301
3301
  'aria-atomic': 'true', 'aria-expanded': 'false',
3302
3302
  'role': 'combobox', 'autocomplete': 'off', 'autocorrect': 'off',
3303
- 'autocapitalize': 'off', 'spellcheck': 'false', 'aria-invalid': 'false'
3303
+ 'autocapitalize': 'off', 'spellcheck': 'false', 'aria-invalid': 'false', 'aria-label': this.getModuleName()
3304
3304
  };
3305
3305
  if (this.getModuleName() === 'datepicker') {
3306
3306
  const l10nLocale = { placeholder: this.placeholder };
@@ -3873,7 +3873,8 @@ let DatePicker = class DatePicker extends Calendar {
3873
3873
  const target = e.target;
3874
3874
  if (!(closest(target, '.e-datepicker.e-popup-wrapper')) && !isNullOrUndefined(this.inputWrapper)
3875
3875
  && !(closest(target, '.' + INPUTCONTAINER) === this.inputWrapper.container)
3876
- && (!target.classList.contains('e-day'))) {
3876
+ && (!target.classList.contains('e-day'))
3877
+ && (!target.classList.contains('e-dlg-overlay'))) {
3877
3878
  this.hide(e);
3878
3879
  this.focusOut();
3879
3880
  }
@@ -4455,6 +4456,11 @@ let DatePicker = class DatePicker extends Calendar {
4455
4456
  }
4456
4457
  EventHandler.add(document, 'mousedown touchstart', this.documentHandler, this);
4457
4458
  });
4459
+ if (Browser.isDevice) {
4460
+ var dlgOverlay = this.createElement('div', { className: 'e-dlg-overlay' });
4461
+ dlgOverlay.style.zIndex = (this.zIndex - 1).toString();
4462
+ this.mobilePopupWrapper.appendChild(dlgOverlay);
4463
+ }
4458
4464
  }
4459
4465
  }
4460
4466
  /**
@@ -4592,7 +4598,7 @@ let DatePicker = class DatePicker extends Calendar {
4592
4598
  const ariaAttrs = {
4593
4599
  'aria-atomic': 'true', 'aria-disabled': 'true',
4594
4600
  'aria-expanded': 'false', 'role': 'combobox', 'autocomplete': 'off',
4595
- 'autocorrect': 'off', 'autocapitalize': 'off', 'spellcheck': 'false'
4601
+ 'autocorrect': 'off', 'autocapitalize': 'off', 'spellcheck': 'false', 'aria-label': this.getModuleName()
4596
4602
  };
4597
4603
  if (this.inputElement) {
4598
4604
  Input.removeAttributes(ariaAttrs, this.inputElement);
@@ -8552,7 +8558,7 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
8552
8558
  (!isNullOrUndefined(this.targetElement) && !(target === this.targetElement))) &&
8553
8559
  !(closest(target, '[id="' + this.popupWrapper.id + '"]'))
8554
8560
  && !(closest(target, '.' + INPUTCONTAINER$1) === this.inputWrapper.container)
8555
- && !(closest(target, '.e-daterangepicker.e-popup') && (!target.classList.contains('e-day')))) {
8561
+ && !(closest(target, '.e-daterangepicker.e-popup') && (!target.classList.contains('e-day'))) && (!target.classList.contains('e-dlg-overlay'))) {
8556
8562
  this.preventBlur = false;
8557
8563
  if (this.isPopupOpen() && document.body.contains(this.popupObj.element)) {
8558
8564
  this.applyFunction(e);
@@ -9204,6 +9210,11 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
9204
9210
  this.isMobile || Browser.isDevice);
9205
9211
  }
9206
9212
  });
9213
+ if (Browser.isDevice) {
9214
+ var dlgOverlay = this.createElement('div', { className: 'e-dlg-overlay' });
9215
+ dlgOverlay.style.zIndex = (this.zIndex - 1).toString();
9216
+ this.mobileRangePopupWrap.appendChild(dlgOverlay);
9217
+ }
9207
9218
  }
9208
9219
  }
9209
9220
  }
@@ -11735,7 +11746,8 @@ let TimePicker = class TimePicker extends Component {
11735
11746
  if (!(closest(target, '[id="' + this.popupObj.element.id + '"]')) && target !== this.inputElement
11736
11747
  && target !== (this.inputWrapper && this.inputWrapper.buttons[0]) &&
11737
11748
  target !== (this.inputWrapper && this.inputWrapper.clearButton) &&
11738
- target !== (this.inputWrapper && this.inputWrapper.container)) {
11749
+ target !== (this.inputWrapper && this.inputWrapper.container)
11750
+ && (!target.classList.contains('e-dlg-overlay'))) {
11739
11751
  if (this.isPopupOpen()) {
11740
11752
  this.hide();
11741
11753
  this.focusOut();
@@ -11947,6 +11959,11 @@ let TimePicker = class TimePicker extends Component {
11947
11959
  this.popupObj = null;
11948
11960
  }
11949
11961
  });
11962
+ if (Browser.isDevice) {
11963
+ var dlgOverlay = this.createElement('div', { className: 'e-dlg-overlay' });
11964
+ dlgOverlay.style.zIndex = (this.zIndex - 1).toString();
11965
+ this.mobileTimePopupWrap.appendChild(dlgOverlay);
11966
+ }
11950
11967
  }
11951
11968
  }
11952
11969
  /* eslint-enable valid-jsdoc, jsdoc/require-param */
@@ -12494,6 +12511,12 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
12494
12511
  this.cloneElement = this.element.cloneNode(true);
12495
12512
  this.dateTimeFormat = this.cldrDateTimeFormat();
12496
12513
  this.initValue = this.value;
12514
+ if (typeof (this.min) === 'string') {
12515
+ this.min = this.checkDateValue(new Date(this.min));
12516
+ }
12517
+ if (typeof (this.max) === 'string') {
12518
+ this.max = this.checkDateValue(new Date(this.max));
12519
+ }
12497
12520
  if (!isNullOrUndefined(closest(this.element, 'fieldset')) && closest(this.element, 'fieldset').disabled) {
12498
12521
  this.enabled = false;
12499
12522
  }
@@ -12852,6 +12875,11 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
12852
12875
  if (Browser.isDevice && this.fullScreenMode) {
12853
12876
  this.dateTimeWrapper.style.left = '0px';
12854
12877
  }
12878
+ if (Browser.isDevice) {
12879
+ var dlgOverlay = this.createElement('div', { className: 'e-dlg-overlay' });
12880
+ dlgOverlay.style.zIndex = (this.zIndex - 1).toString();
12881
+ this.timeModal.appendChild(dlgOverlay);
12882
+ }
12855
12883
  }
12856
12884
  }
12857
12885
  }
@@ -12889,7 +12917,7 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
12889
12917
  event.preventDefault();
12890
12918
  }
12891
12919
  if (!(closest(target, '[id="' + (this.popupObject && this.popupObject.element.id + '"]'))) && target !== this.inputElement
12892
- && target !== this.timeIcon && !isNullOrUndefined(this.inputWrapper) && target !== this.inputWrapper.container) {
12920
+ && target !== this.timeIcon && !isNullOrUndefined(this.inputWrapper) && target !== this.inputWrapper.container && !target.classList.contains('e-dlg-overlay')) {
12893
12921
  if (this.isTimePopupOpen()) {
12894
12922
  this.hide(event);
12895
12923
  this.focusOut();