This is a migrated thread and some comments may be shown as answers.

Calender Focus Problem

3 Answers 65 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
nirav
Top achievements
Rank 1
nirav asked on 08 Aug 2009, 11:07 AM
Hello all,
I have one problem with Date Picker Telerik Control that after selecting date, cursor is not focused properly to the corresponding textbox.

Thanx for any kind of help.

Regards,
Nirav

3 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 10 Aug 2009, 07:21 AM
Hi Ninav,

Try the following code snippet in order to focus to the input textbox of RadDatePicker on selecting date.

ASPX:
 
<telerik:RadDatePicker ID="RadDatePicker1" runat="server"
    <ClientEvents OnDateSelected="OnDateSelected" /> 
</telerik:RadDatePicker> 

JavaScript:
 
<script type="text/javascript"
function OnDateSelected() 
    var datepicker = $find("<%= RadDatePicker1.ClientID %>"); 
    var textbox = datepicker.get_textBox(); 
    textbox.focus(); 
</script> 
 

-Shinu.
0
Accepted
Pavlina
Telerik team
answered on 10 Aug 2009, 07:22 AM
Hello Nirav,

The client-side object for the RadDateInput control have a focus method that lets you set focus to the control. The attached example uses this method to set focus to a RadDatePicker1.DateInput control

Best wishes,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
nirav
Top achievements
Rank 1
answered on 10 Aug 2009, 08:07 AM

Thank you for ur both reply.

it is succesfully working.

why r u not focus in live demo application?

well thanks again.

Tags
Calendar
Asked by
nirav
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Pavlina
Telerik team
nirav
Top achievements
Rank 1
Share this question
or