@syncfusion/ej2-calendars 25.2.5 → 25.2.7

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.
@@ -478,6 +478,9 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
478
478
  this.nextIcon = this.previousIcon = this.table = null;
479
479
  };
480
480
  CalendarBase.prototype.keyActionHandle = function (e, value, multiSelection) {
481
+ if (this.calendarElement === null && e.action === 'escape') {
482
+ return;
483
+ }
481
484
  var focusedDate = this.tableBodyElement.querySelector('tr td.e-focused-date');
482
485
  var selectedDate;
483
486
  if (multiSelection) {
@@ -632,7 +635,12 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
632
635
  case 'tab':
633
636
  if ((this.getModuleName() === 'datepicker' || this.getModuleName() === 'datetimepicker') && e.target === this.todayElement) {
634
637
  e.preventDefault();
635
- this.element.focus();
638
+ if (this.isAngular) {
639
+ this.inputElement.focus();
640
+ }
641
+ else {
642
+ this.element.focus();
643
+ }
636
644
  this.hide();
637
645
  }
638
646
  break;
@@ -643,6 +651,11 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
643
651
  this.hide();
644
652
  }
645
653
  break;
654
+ case 'escape':
655
+ if ((this.getModuleName() === 'datepicker' || this.getModuleName() === 'datetimepicker') && (e.target === this.headerTitleElement || e.target === this.previousIcon || e.target === this.nextIcon || e.target === this.todayElement)) {
656
+ this.hide();
657
+ }
658
+ break;
646
659
  }
647
660
  };
648
661
  CalendarBase.prototype.keyboardNavigate = function (number, currentView, e, max, min) {