@syncfusion/ej2-calendars 21.1.37 → 21.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.
@@ -810,7 +810,7 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
810
810
  addClass([tdEle], SELECTED);
811
811
  }
812
812
  this.updateFocus(otherMnthBool, disabledCls, localDate, tdEle, currentDate);
813
- if (date.getFullYear() === todayDate.getFullYear() && date.getMonth() === todayDate.getMonth()
813
+ if (!isNullOrUndefined(date) && date.getFullYear() === todayDate.getFullYear() && date.getMonth() === todayDate.getMonth()
814
814
  && date.getDate() === todayDate.getDate()) {
815
815
  addClass([tdEle], TODAY);
816
816
  }
@@ -943,7 +943,10 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
943
943
  var type = (this.calendarMode === 'Gregorian') ? 'gregorian' : 'islamic';
944
944
  var dateFormatOptions = { skeleton: 'full', type: 'dateTime', calendar: type };
945
945
  var date = this.globalize.parseDate(this.globalize.formatDate(localDate, dateFormatOptions), dateFormatOptions);
946
- var value = date.valueOf();
946
+ var value;
947
+ if (!isNullOrUndefined(date)) {
948
+ value = date.valueOf();
949
+ }
947
950
  var attrs = {
948
951
  className: CELL, attrs: { 'id': '' + getUniqueID('' + value), 'aria-selected': 'false' }
949
952
  };
@@ -4894,7 +4897,7 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
4894
4897
  addClass([this.inputWrapper.container], ERROR);
4895
4898
  attributes(this.inputElement, { 'aria-invalid': 'true' });
4896
4899
  }
4897
- else {
4900
+ else if (!isNullOrUndefined(this.inputWrapper)) {
4898
4901
  removeClass([this.inputWrapper.container], ERROR);
4899
4902
  attributes(this.inputElement, { 'aria-invalid': 'false' });
4900
4903
  }
@@ -12003,7 +12006,7 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
12003
12006
  this.invalidValueString = null;
12004
12007
  this.checkInvalidValue(newProp.value);
12005
12008
  newProp.value = this.value;
12006
- if (!this.invalidValueString) {
12009
+ if (!this.invalidValueString && !this.enableMask) {
12007
12010
  if (typeof newProp.value === 'string') {
12008
12011
  this.setProperties({ value: this.checkDateValue(new Date(newProp.value)) }, true);
12009
12012
  newProp.value = this.value;
@@ -12016,6 +12019,10 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
12016
12019
  this.initValue = newProp.value;
12017
12020
  newProp.value = this.compareFormatChange(this.checkValue(newProp.value));
12018
12021
  }
12022
+ else if (this.enableMask) {
12023
+ this.updateInputValue(this.maskedDateValue);
12024
+ this.checkErrorState(this.maskedDateValue);
12025
+ }
12019
12026
  else {
12020
12027
  this.updateInputValue(this.invalidValueString);
12021
12028
  this.checkErrorState(this.invalidValueString);
@@ -13527,7 +13534,12 @@ var DateTimePicker = /** @__PURE__ @class */ (function (_super) {
13527
13534
  this.checkInvalidValue(newProp.value);
13528
13535
  newProp.value = this.value;
13529
13536
  newProp.value = this.validateValue(newProp.value);
13530
- Input.setValue(this.getFormattedValue(newProp.value), this.inputElement, this.floatLabelType, this.showClearButton);
13537
+ if (this.enableMask) {
13538
+ Input.setValue(this.maskedDateValue, this.inputElement, this.floatLabelType, this.showClearButton);
13539
+ }
13540
+ else {
13541
+ Input.setValue(this.getFormattedValue(newProp.value), this.inputElement, this.floatLabelType, this.showClearButton);
13542
+ }
13531
13543
  this.valueWithMinutes = newProp.value;
13532
13544
  this.setProperties({ value: newProp.value }, true);
13533
13545
  if (this.popupObj) {