@syncfusion/ej2-calendars 33.2.12 → 33.2.15
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.
- package/dist/ej2-calendars.min.js +2 -2
- package/dist/ej2-calendars.umd.min.js +2 -2
- package/dist/ej2-calendars.umd.min.js.map +1 -1
- package/dist/es6/ej2-calendars.es2015.js +26 -20
- package/dist/es6/ej2-calendars.es2015.js.map +1 -1
- package/dist/es6/ej2-calendars.es5.js +26 -20
- package/dist/es6/ej2-calendars.es5.js.map +1 -1
- package/dist/global/ej2-calendars.min.js +2 -2
- package/dist/global/ej2-calendars.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/helpers/e2e/calendarHelper.d.ts +25 -0
- package/helpers/e2e/calendarHelper.js +87 -0
- package/helpers/e2e/datepickerHelper.d.ts +28 -0
- package/helpers/e2e/datepickerHelper.js +96 -0
- package/helpers/e2e/daterangepickerHelper.d.ts +39 -0
- package/helpers/e2e/daterangepickerHelper.js +129 -0
- package/helpers/e2e/datetimepickerHelper.d.ts +38 -0
- package/helpers/e2e/datetimepickerHelper.js +126 -0
- package/helpers/e2e/index.d.ts +5 -0
- package/helpers/e2e/index.js +12 -0
- package/helpers/e2e/timepickerHelper.d.ts +17 -0
- package/helpers/e2e/timepickerHelper.js +63 -0
- package/package.json +3 -3
- package/src/calendar/calendar.d.ts +1 -0
- package/src/calendar/calendar.js +26 -20
|
@@ -629,32 +629,29 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
629
629
|
break;
|
|
630
630
|
case 'tab':
|
|
631
631
|
if (this.getModuleName() === 'datepicker' || this.getModuleName() === 'datetimepicker') {
|
|
632
|
-
const
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
}
|
|
641
|
-
else {
|
|
642
|
-
this.element.focus();
|
|
632
|
+
const popupEl = this.popupWrapper;
|
|
633
|
+
if (!isNullOrUndefined(popupEl)) {
|
|
634
|
+
const focusable = this.getPopupFocusableElements(popupEl);
|
|
635
|
+
const lastIndex = focusable.length - 1;
|
|
636
|
+
if (focusable.length > 0 && e.target === focusable[lastIndex]) {
|
|
637
|
+
e.preventDefault();
|
|
638
|
+
focusable[0].focus();
|
|
639
|
+
// popup stays open — no hide() call
|
|
643
640
|
}
|
|
644
|
-
this.hide();
|
|
645
641
|
}
|
|
646
642
|
}
|
|
647
643
|
break;
|
|
648
644
|
case 'shiftTab':
|
|
649
|
-
if (
|
|
650
|
-
|
|
651
|
-
if (
|
|
652
|
-
this.
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
645
|
+
if (this.getModuleName() === 'datepicker' || this.getModuleName() === 'datetimepicker') {
|
|
646
|
+
const popupEl = this.popupWrapper;
|
|
647
|
+
if (!isNullOrUndefined(popupEl)) {
|
|
648
|
+
const focusable = this.getPopupFocusableElements(popupEl);
|
|
649
|
+
if (focusable.length > 0 && e.target === focusable[0]) {
|
|
650
|
+
e.preventDefault();
|
|
651
|
+
focusable[focusable.length - 1].focus();
|
|
652
|
+
// popup stays open — no hide() call
|
|
653
|
+
}
|
|
656
654
|
}
|
|
657
|
-
this.hide();
|
|
658
655
|
}
|
|
659
656
|
break;
|
|
660
657
|
case 'escape':
|
|
@@ -664,6 +661,15 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
664
661
|
break;
|
|
665
662
|
}
|
|
666
663
|
}
|
|
664
|
+
getPopupFocusableElements(container) {
|
|
665
|
+
const selector = [
|
|
666
|
+
'button:not([disabled]):not([tabindex="-1"])',
|
|
667
|
+
'td[tabindex="0"]:not([aria-disabled="true"])',
|
|
668
|
+
'[tabindex="0"]:not([disabled])'
|
|
669
|
+
].join(', ');
|
|
670
|
+
return Array.from(container.querySelectorAll(selector))
|
|
671
|
+
.filter((el) => !isNullOrUndefined(el.offsetParent));
|
|
672
|
+
}
|
|
667
673
|
keyboardNavigate(number, currentView, e, max, min) {
|
|
668
674
|
const date = new Date(this.checkValue(this.currentDate));
|
|
669
675
|
switch (currentView) {
|