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

To focus from raddatepicker to another

1 Answer 37 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 21 Jul 2010, 03:37 PM
Hye guys,

I ve got 2 raddatepicker, how can i change the focus form the  first to the second one as soon as the user choose his first date.

Thanks!

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 22 Jul 2010, 07:04 AM
Hello David,


You can accomplish this by using the client side api of RadDatePicker. Here is an example.

mark-up:
<telerik:RadDatePicker ID="RadDatePicker1" runat="server">
    <ClientEvents OnDateSelected="OnDateSelectedHandler" />
</telerik:RadDatePicker>
<telerik:RadDatePicker ID="RadDatePicker2" runat="server">
</telerik:RadDatePicker>


client code:
<script type="text/javascript">
    function OnDateSelectedHandler(sender, args) {
        var datePicker= $find('<%= RadDatePicker2.ClientID %>');
        datePicker.get_dateInput()._textBoxElement.focus(); // focus to textbox element
        datePicker.showPopup(); // To show the popup
    }
</script>


-Shinu.
Tags
Calendar
Asked by
David
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or