@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.
@@ -462,6 +462,9 @@ let CalendarBase = class CalendarBase extends Component {
462
462
  this.nextIcon = this.previousIcon = this.table = null;
463
463
  }
464
464
  keyActionHandle(e, value, multiSelection) {
465
+ if (this.calendarElement === null && e.action === 'escape') {
466
+ return;
467
+ }
465
468
  const focusedDate = this.tableBodyElement.querySelector('tr td.e-focused-date');
466
469
  let selectedDate;
467
470
  if (multiSelection) {
@@ -616,7 +619,12 @@ let CalendarBase = class CalendarBase extends Component {
616
619
  case 'tab':
617
620
  if ((this.getModuleName() === 'datepicker' || this.getModuleName() === 'datetimepicker') && e.target === this.todayElement) {
618
621
  e.preventDefault();
619
- this.element.focus();
622
+ if (this.isAngular) {
623
+ this.inputElement.focus();
624
+ }
625
+ else {
626
+ this.element.focus();
627
+ }
620
628
  this.hide();
621
629
  }
622
630
  break;
@@ -627,6 +635,11 @@ let CalendarBase = class CalendarBase extends Component {
627
635
  this.hide();
628
636
  }
629
637
  break;
638
+ case 'escape':
639
+ if ((this.getModuleName() === 'datepicker' || this.getModuleName() === 'datetimepicker') && (e.target === this.headerTitleElement || e.target === this.previousIcon || e.target === this.nextIcon || e.target === this.todayElement)) {
640
+ this.hide();
641
+ }
642
+ break;
630
643
  }
631
644
  }
632
645
  keyboardNavigate(number, currentView, e, max, min) {