I hope you are doing well!
We just released the Latest Internal Build 2019.2.814 of the suite with a fix for this issue and wanted to notify you about that.
You can check the release notes at https://www.telerik.com/support/whats-new/aspnet-ajax/release-history/ui-for-asp-net-ajax-2019-2-814-(nightly-build-2019-08-14) as well as download the Telerik_UI_for_ASP.NET_AJAX_2019_2_814_Dev_hotfix.zip installation from https://www.telerik.com/account/product-download?product=RCAJAX.
<
telerik:RadMonthYearPicker
RenderMode
=
"Lightweight"
EnableTyping
=
"true"
ID
=
"RadMonthYearPicker1"
runat
=
"server"
EnableAriaSupport
=
"true"
TabIndex
=
"1"
>
<
DateInput
ID
=
"DateInput1"
runat
=
"server"
EmptyMessage
=
"Choose a date"
ToolTip
=
"Date input"
>
</
DateInput
>
<
ClientEvents
OnPopupOpening
=
"OnPopupOpening"
OnPopupClosing
=
"OnPopupClosing"
/>
<
MonthYearNavigationSettings
EnableScreenBoundaryDetection
=
"true"
></
MonthYearNavigationSettings
>
</
telerik:RadMonthYearPicker
>
<script>
function
OnPopupOpening(sender, args) {
var
popup = args.get_pickerControl().Popup;
setTimeout(
function
() {
var
$popupElement = $telerik.$(popup.DomElement);
$popupElement.find(
"tbody [role='gridcell'] a"
).eq(0).focus();
});
}
function
OnPopupClosing(sender, args) {
sender.get_dateInput().focus();
}
</script>
var
_onPopupOpening =
function
(sender, args) {
setTimeout(
function
() {
//TelerikDateTextBox and TelerikMonthYearTextBox have different interfaces.
// get_pickerControl is for TelerikMonthYearTextBox
// get_popupControl is for TelerikDateTextBox
var
popupDom = args.get_pickerControl ? args.get_pickerControl().Popup.DomElement : args.get_popupControl()._calendarDomObject;
var
$popupElement = $telerik.$(popupDom);
//set focus to first "selected" element
//$popupElement.find("tbody [role='gridcell'] a").eq(0).focus(); // Telerik's suggested selector... doesn't work because role is missing when EnableAriaSupport=false.
$popupElement.find(
"tbody tr td.rcSelected a"
).eq(0).focus();
if
(!$popupElement[0].classList.contains(
"hasTabEvent"
)) {
$popupElement[0].addEventListener(
"keydown"
,
function
() {
//set flag so we only setup event handlers one time.
$popupElement[0].classList.add(
"hasTabEvent"
);
if
(event.key ===
"Tab"
) {
//we have to get the node list inside the listener, because it might have changed since the
//calendar was opened. (Like if we changed the year or month in the calendar.)
var
$nodes = $popupElement.find(
"tbody tr td a"
);
//Some calendars have link buttons at the bottom. When present, we want to use the last button
//as our last element instead of the last calendar entry. (See TelerikMonthYearTextBox)
var
$buttons = $popupElement.find(
".rcButtons"
);
var
first = $nodes[0];
var
last = $buttons.length ? $buttons.children().last()[0] : $nodes.last()[0];
//If shift key down and current node is first, set target to last node.
//If shift key up and current node is last, set target to first node.
var
target = event.shiftKey && event.srcElement.isSameNode(first) ? last :
!event.shiftKey && event.srcElement.isSameNode(last) ? first :
undefined;
if
(target) {
target.focus();
event.preventDefault();
}
}
});
}
});
//end setTimeout
};