RadDatepicker focus

4 posts, 0 answers
  1. Rahul Khinvasara
    Rahul Khinvasara avatar
    303 posts
    Member since:
    Aug 2007

    Posted 04 Dec 2009 Link to this post

    i am using Q2 2009 version.I am having a problem with RadDatePicker control.I want to set  focus to the raddatepicker when the page gets loaded. i am using myraddatepicker.dateinput.focus() on my page_load function,But the focus is not setting to raddatepicker.

    Please give me the solution ASAP.

    Rahul Khinvasara.
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 07 Dec 2009 Link to this post

    Hello Rahul Khinvasara,

    I tried the following code in order to focus the DateInput, and it is working fine for me.

    Also give a try with client side approach for focusing the DateInput.
    <script type="text/javascript"
        function pageLoad() { 
           var DatePicker5 = $find("<%= RadDatePicker5.ClientID %>"); 

    I am not quite sure about what is happening at your end. Please make sure that you have not set focus to any other control in the page.

  3. DevCraft R3 2016 release webinar banner
  4. Big
    Big avatar
    3 posts
    Member since:
    Sep 2011

    Posted 16 Sep 2011 Link to this post

    I'm having problems too setting up the focus method. Here is the entire code I tried. As you can see, I simplified the code to the bare minimum. The control loads fine if I comment out the javascript below, but when I try to set the focus to it, it gives me this error message: "Microsoft JScript runtime error: Object doesn't support this property or method" and it highlights this line as the source of the error:



    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Test.aspx.cs" Inherits="Test"%>
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
        <title>Untitled Page</title>
        <form id="form1" runat="server">
            <asp:ScriptManager ID="ScriptManager1" runat="server" />
                <telerik:RadDatePicker ID="RadDatePicker1" runat="server">
                <script type="text/javascript">
                    var DatePicker4 = document.getElementById('<%= RadDatePicker1.ClientID %>');




  5. Big
    Big avatar
    3 posts
    Member since:
    Sep 2011
Back to Top