@syncfusion/ej2-calendars 25.2.4 → 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) {
@@ -11426,7 +11439,7 @@ let TimePicker = class TimePicker extends Component {
11426
11439
  break;
11427
11440
  }
11428
11441
  }
11429
- return this.prevValue;
11442
+ return this.getValue(date);
11430
11443
  }
11431
11444
  resetState() {
11432
11445
  this.removeSelection();
@@ -11713,7 +11726,7 @@ let TimePicker = class TimePicker extends Component {
11713
11726
  }
11714
11727
  updateInput(isUpdate, date) {
11715
11728
  if (isUpdate) {
11716
- this.prevValue = this.getValue(date);
11729
+ this.prevValue = this.getValue(this.prevDate);
11717
11730
  }
11718
11731
  this.prevDate = this.valueWithMinutes = date;
11719
11732
  if ((typeof date !== 'number') || (this.value && +new Date(+this.value).setMilliseconds(0)) !== +date) {