@syncfusion/ej2-calendars 21.1.38 → 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.
@@ -793,7 +793,7 @@ let CalendarBase = class CalendarBase extends Component {
793
793
  addClass([tdEle], SELECTED);
794
794
  }
795
795
  this.updateFocus(otherMnthBool, disabledCls, localDate, tdEle, currentDate);
796
- if (date.getFullYear() === todayDate.getFullYear() && date.getMonth() === todayDate.getMonth()
796
+ if (!isNullOrUndefined(date) && date.getFullYear() === todayDate.getFullYear() && date.getMonth() === todayDate.getMonth()
797
797
  && date.getDate() === todayDate.getDate()) {
798
798
  addClass([tdEle], TODAY);
799
799
  }
@@ -926,7 +926,10 @@ let CalendarBase = class CalendarBase extends Component {
926
926
  const type = (this.calendarMode === 'Gregorian') ? 'gregorian' : 'islamic';
927
927
  const dateFormatOptions = { skeleton: 'full', type: 'dateTime', calendar: type };
928
928
  const date = this.globalize.parseDate(this.globalize.formatDate(localDate, dateFormatOptions), dateFormatOptions);
929
- const value = date.valueOf();
929
+ let value;
930
+ if (!isNullOrUndefined(date)) {
931
+ value = date.valueOf();
932
+ }
930
933
  const attrs = {
931
934
  className: CELL, attrs: { 'id': '' + getUniqueID('' + value), 'aria-selected': 'false' }
932
935
  };
@@ -11879,7 +11882,7 @@ let TimePicker = class TimePicker extends Component {
11879
11882
  this.invalidValueString = null;
11880
11883
  this.checkInvalidValue(newProp.value);
11881
11884
  newProp.value = this.value;
11882
- if (!this.invalidValueString) {
11885
+ if (!this.invalidValueString && !this.enableMask) {
11883
11886
  if (typeof newProp.value === 'string') {
11884
11887
  this.setProperties({ value: this.checkDateValue(new Date(newProp.value)) }, true);
11885
11888
  newProp.value = this.value;
@@ -11892,6 +11895,10 @@ let TimePicker = class TimePicker extends Component {
11892
11895
  this.initValue = newProp.value;
11893
11896
  newProp.value = this.compareFormatChange(this.checkValue(newProp.value));
11894
11897
  }
11898
+ else if (this.enableMask) {
11899
+ this.updateInputValue(this.maskedDateValue);
11900
+ this.checkErrorState(this.maskedDateValue);
11901
+ }
11895
11902
  else {
11896
11903
  this.updateInputValue(this.invalidValueString);
11897
11904
  this.checkErrorState(this.invalidValueString);
@@ -13381,7 +13388,12 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
13381
13388
  this.checkInvalidValue(newProp.value);
13382
13389
  newProp.value = this.value;
13383
13390
  newProp.value = this.validateValue(newProp.value);
13384
- Input.setValue(this.getFormattedValue(newProp.value), this.inputElement, this.floatLabelType, this.showClearButton);
13391
+ if (this.enableMask) {
13392
+ Input.setValue(this.maskedDateValue, this.inputElement, this.floatLabelType, this.showClearButton);
13393
+ }
13394
+ else {
13395
+ Input.setValue(this.getFormattedValue(newProp.value), this.inputElement, this.floatLabelType, this.showClearButton);
13396
+ }
13385
13397
  this.valueWithMinutes = newProp.value;
13386
13398
  this.setProperties({ value: newProp.value }, true);
13387
13399
  if (this.popupObj) {