@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.
@@ -1583,10 +1583,10 @@ let CalendarBase = class CalendarBase extends Component {
1583
1583
  * @returns {string}
1584
1584
  */
1585
1585
  currentView() {
1586
- if (this.contentElement.classList.contains(YEAR)) {
1586
+ if (!isNullOrUndefined(this.contentElement) && this.contentElement.classList.contains(YEAR)) {
1587
1587
  return 'Year';
1588
1588
  }
1589
- else if (this.contentElement.classList.contains(DECADE)) {
1589
+ else if (!isNullOrUndefined(this.contentElement) && this.contentElement.classList.contains(DECADE)) {
1590
1590
  return 'Decade';
1591
1591
  }
1592
1592
  else {
@@ -9783,9 +9783,11 @@ let TimePicker = class TimePicker extends Component {
9783
9783
  }
9784
9784
  validateDisable() {
9785
9785
  this.setMinMax(this.initMin, this.initMax);
9786
- this.popupCreation();
9787
- this.popupObj.destroy();
9788
- this.popupWrapper = this.popupObj = null;
9786
+ if (!isNullOrUndefined(this.value)) {
9787
+ this.popupCreation();
9788
+ this.popupObj.destroy();
9789
+ this.popupWrapper = this.popupObj = null;
9790
+ }
9789
9791
  if ((!isNaN(+this.value) && this.value !== null)) {
9790
9792
  if (!this.valueIsDisable(this.value)) {
9791
9793
  //disable value given in value property so reset the date based on current date
@@ -10510,6 +10512,11 @@ let TimePicker = class TimePicker extends Component {
10510
10512
  case 'end':
10511
10513
  case 'up':
10512
10514
  case 'down':
10515
+ if (!this.isPopupOpen()) {
10516
+ this.popupCreation();
10517
+ this.popupObj.destroy();
10518
+ this.popupObj = this.popupWrapper = null;
10519
+ }
10513
10520
  if (this.enableMask && !this.readonly && !this.isPopupOpen()) {
10514
10521
  event.preventDefault();
10515
10522
  this.notify('keyDownHandler', {