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

How to SetValue of Teleric Date Picker Control

3 Answers 73 Views
Sharepoint Integration
This is a migrated thread and some comments may be shown as answers.
Nilesh
Top achievements
Rank 1
Nilesh asked on 21 Aug 2012, 05:52 PM
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-

3 Answers, 1 is accepted

Sort by
0
Galin
Telerik team
answered on 24 Aug 2012, 12:34 PM
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.
0
Nilesh
Top achievements
Rank 1
answered on 27 Aug 2012, 06:00 PM
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.
0
Galin
Telerik team
answered on 31 Aug 2012, 07:14 AM
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.
Tags
Sharepoint Integration
Asked by
Nilesh
Top achievements
Rank 1
Answers by
Galin
Telerik team
Nilesh
Top achievements
Rank 1
Share this question
or