Hello,
I am attempting to set focus, using javascript, on the text entry portion of DateInput in my RadDatePicker.
This is the control.
<telerik:RadDatePicker ID="rdpTransDate" Runat="server" |
SelectedDate='<%# Bind("TransDate") %>' Skin="Black" TabIndex="1"> |
<Calendar runat="server" UseColumnHeadersAsSelectors="False" |
UseRowHeadersAsSelectors="False" ViewSelectorText="x" |
Skin="Black"></Calendar> |
<DatePopupButton HoverImageUrl="" ImageUrl="" TabIndex="1" /> |
<DateInput ID="diTransDate" runat="server" DateFormat="MM/dd/yyyy" |
DisplayDateFormat="MM/dd/yyyy" TabIndex="1" ></DateInput> |
</telerik:RadDatePicker> |
I use the following javascript method to set it's focus.
function SaveTabbed() { |
var e = window.event; |
var TABKEY = 9; |
if (e.keyCode == TABKEY) { |
var rdp = $find("ucScrapInput_fvScrapInput_rdpTransDate"); |
rdp.get_dateInput().focus(); |
} |
return false; |
} |
The method works just fine except that focus is set on the DatePopupButton rather than the text entry box. The browser (IE8 in this case) is able to tab to the text field with the Tab and Shift-Tab buttons. I have removed the TabIndex attributes from all but the DateInput with no change in behavior. Setting the visibility of the button to false caused focus of the control to be passed to the control with the next TabIndex.
Is there a way to explicitly set focus to the text input portion of the control?
Thank you in advance,
Travis