@syncfusion/ej2-calendars 21.1.35 → 21.1.38

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.
@@ -3218,7 +3218,6 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
3218
3218
  */
3219
3219
  function DatePicker(options, element) {
3220
3220
  var _this = _super.call(this, options, element) || this;
3221
- _this.previousElementValue = '';
3222
3221
  _this.isDateIconClicked = false;
3223
3222
  _this.isAltKeyPressed = false;
3224
3223
  _this.isInteracted = true;
@@ -4895,7 +4894,7 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
4895
4894
  addClass([this.inputWrapper.container], ERROR);
4896
4895
  attributes(this.inputElement, { 'aria-invalid': 'true' });
4897
4896
  }
4898
- else {
4897
+ else if (!isNullOrUndefined(this.inputWrapper)) {
4899
4898
  removeClass([this.inputWrapper.container], ERROR);
4900
4899
  attributes(this.inputElement, { 'aria-invalid': 'false' });
4901
4900
  }
@@ -4920,7 +4919,12 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
4920
4919
  newProp.value = this.value;
4921
4920
  this.previousElementValue = this.inputElement.value;
4922
4921
  if (isNullOrUndefined(this.value)) {
4923
- this.updateInputValue('');
4922
+ if (this.enableMask) {
4923
+ this.updateInputValue(this.maskedDateValue);
4924
+ }
4925
+ else {
4926
+ this.updateInputValue('');
4927
+ }
4924
4928
  this.currentDate = new Date(new Date().setHours(0, 0, 0, 0));
4925
4929
  }
4926
4930
  this.updateInput(true);