@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
|
@@ -645,32 +645,29 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
645
645
|
break;
|
|
646
646
|
case 'tab':
|
|
647
647
|
if (this.getModuleName() === 'datepicker' || this.getModuleName() === 'datetimepicker') {
|
|
648
|
-
var
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
}
|
|
657
|
-
else {
|
|
658
|
-
this.element.focus();
|
|
648
|
+
var popupEl = this.popupWrapper;
|
|
649
|
+
if (!isNullOrUndefined(popupEl)) {
|
|
650
|
+
var focusable = this.getPopupFocusableElements(popupEl);
|
|
651
|
+
var lastIndex = focusable.length - 1;
|
|
652
|
+
if (focusable.length > 0 && e.target === focusable[lastIndex]) {
|
|
653
|
+
e.preventDefault();
|
|
654
|
+
focusable[0].focus();
|
|
655
|
+
// popup stays open — no hide() call
|
|
659
656
|
}
|
|
660
|
-
this.hide();
|
|
661
657
|
}
|
|
662
658
|
}
|
|
663
659
|
break;
|
|
664
660
|
case 'shiftTab':
|
|
665
|
-
if (
|
|
666
|
-
|
|
667
|
-
if (
|
|
668
|
-
this.
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
661
|
+
if (this.getModuleName() === 'datepicker' || this.getModuleName() === 'datetimepicker') {
|
|
662
|
+
var popupEl = this.popupWrapper;
|
|
663
|
+
if (!isNullOrUndefined(popupEl)) {
|
|
664
|
+
var focusable = this.getPopupFocusableElements(popupEl);
|
|
665
|
+
if (focusable.length > 0 && e.target === focusable[0]) {
|
|
666
|
+
e.preventDefault();
|
|
667
|
+
focusable[focusable.length - 1].focus();
|
|
668
|
+
// popup stays open — no hide() call
|
|
669
|
+
}
|
|
672
670
|
}
|
|
673
|
-
this.hide();
|
|
674
671
|
}
|
|
675
672
|
break;
|
|
676
673
|
case 'escape':
|
|
@@ -680,6 +677,15 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
680
677
|
break;
|
|
681
678
|
}
|
|
682
679
|
};
|
|
680
|
+
CalendarBase.prototype.getPopupFocusableElements = function (container) {
|
|
681
|
+
var selector = [
|
|
682
|
+
'button:not([disabled]):not([tabindex="-1"])',
|
|
683
|
+
'td[tabindex="0"]:not([aria-disabled="true"])',
|
|
684
|
+
'[tabindex="0"]:not([disabled])'
|
|
685
|
+
].join(', ');
|
|
686
|
+
return Array.from(container.querySelectorAll(selector))
|
|
687
|
+
.filter(function (el) { return !isNullOrUndefined(el.offsetParent); });
|
|
688
|
+
};
|
|
683
689
|
CalendarBase.prototype.keyboardNavigate = function (number, currentView, e, max, min) {
|
|
684
690
|
var date = new Date(this.checkValue(this.currentDate));
|
|
685
691
|
switch (currentView) {
|