How to SetValue of Teleric Date Picker Control

4 posts, 0 answers
  1. Nilesh
    Nilesh avatar
    5 posts
    Member since:
    Aug 2012

    Posted 21 Aug 2012 Link to this post

    Hello,

    I have a sharepoint page on which i am using third party control(QuestWEbpart) which uses teleric controls. So from javascript i want to set the date of date picker control?
    how to do this? 

    as i have seen posts to get datepicker like below but i could not find this id and in Content Editor webpart this syntax was giving error.
    var datepicker = $find("<%= RadDatePicker1.ClientID %>");

    So can you please suggest me how to set the date using javascript in SharePoint environemnt

    Thanks-
  2. Galin
    Admin
    Galin avatar
    526 posts

    Posted 24 Aug 2012 Link to this post

    Hello Nilesh,

    Could you please give more information about the error?

    Also, in case you are using <% %> in your page's head you should use RadCodeBlock and RadScriptBlock.


    All the best,
    Galin
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.

  3. Nilesh
    Nilesh avatar
    5 posts
    Member since:
    Aug 2012

    Posted 27 Aug 2012 Link to this post

    Thaks for the response.
    Basically i want to get the client id of rad datepicker control to set  the value but i am unable to get id. So is there any way to get all date picker controls id on a page using javascript.
  4. Galin
    Admin
    Galin avatar
    526 posts

    Posted 31 Aug 2012 Link to this post

    Hello Nilesh,

    You can get all RadDatePickers by using its CSS class name RadPicker. This is the wrapper of Control and its ID ends with _wrapper, therefore you should remove this suffix. Source example:

    $telerik.$(".RadPicker").each(function () {
        alert(this.id.replace("_wrapper", ""));
         var datepicker = $find(this.id.replace("_wrapper", ""));
    });

    I hope this helps.

    All the best,
    Galin
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top