@syncfusion/ej2-calendars 21.2.6 → 21.2.9

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.
@@ -1601,10 +1601,10 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
1601
1601
  * @returns {string}
1602
1602
  */
1603
1603
  CalendarBase.prototype.currentView = function () {
1604
- if (this.contentElement.classList.contains(YEAR)) {
1604
+ if (!isNullOrUndefined(this.contentElement) && this.contentElement.classList.contains(YEAR)) {
1605
1605
  return 'Year';
1606
1606
  }
1607
- else if (this.contentElement.classList.contains(DECADE)) {
1607
+ else if (!isNullOrUndefined(this.contentElement) && this.contentElement.classList.contains(DECADE)) {
1608
1608
  return 'Decade';
1609
1609
  }
1610
1610
  else {
@@ -9899,9 +9899,11 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
9899
9899
  };
9900
9900
  TimePicker.prototype.validateDisable = function () {
9901
9901
  this.setMinMax(this.initMin, this.initMax);
9902
- this.popupCreation();
9903
- this.popupObj.destroy();
9904
- this.popupWrapper = this.popupObj = null;
9902
+ if (!isNullOrUndefined(this.value)) {
9903
+ this.popupCreation();
9904
+ this.popupObj.destroy();
9905
+ this.popupWrapper = this.popupObj = null;
9906
+ }
9905
9907
  if ((!isNaN(+this.value) && this.value !== null)) {
9906
9908
  if (!this.valueIsDisable(this.value)) {
9907
9909
  //disable value given in value property so reset the date based on current date
@@ -10629,6 +10631,11 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
10629
10631
  case 'end':
10630
10632
  case 'up':
10631
10633
  case 'down':
10634
+ if (!this.isPopupOpen()) {
10635
+ this.popupCreation();
10636
+ this.popupObj.destroy();
10637
+ this.popupObj = this.popupWrapper = null;
10638
+ }
10632
10639
  if (this.enableMask && !this.readonly && !this.isPopupOpen()) {
10633
10640
  event.preventDefault();
10634
10641
  this.notify('keyDownHandler', {