Focus On RadDatePicker in Javascript

3 posts, 0 answers
  1. Sanjeev
    Sanjeev avatar
    17 posts
    Member since:
    Sep 2011

    Posted 05 Mar 2013 Link to this post

    Hi, I want to set focus on RadDateControl(either in text or popup button) after validating Client side.
    I have tried many examples after googling/forum.

    e.g. From http://www.telerik.com/community/forums/aspnet-ajax/calendar/raddatepicker-focus.aspx


         var DatePicker5 = $find("<%= RadDatePicker5.ClientID %>"); 
           DatePicker4.get_dateInput().focus();     

    But all such lines/codes are obsolete. I do not want to add any default date for select method(for focus purpose)
    .
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 05 Mar 2013 Link to this post

    Hi,

    You can set focus in DatePicker using the following method.
    aspx:
    <telerik:RadDatePicker ID="RadDatePicker5" runat="server"></telerik:RadDatePicker>
    JS:
    function pageLoad() {
           var DatePicker5 = $find("<%= RadDatePicker5.ClientID %>");
           DatePicker5.get_dateInput().focus();
       }

    Thanks,
    Shinu
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Sanjeev
    Sanjeev avatar
    17 posts
    Member since:
    Sep 2011

    Posted 05 Mar 2013 Link to this post

    Hi Shinu,
    Thanks for reply. I have already tried and is not working. It may be fine for older version of telerik controls.Also I want to say I do not want it on pageLoad event but in my 'Validate()' method.


Back to Top