I am trying to open a calender present in a rad date picker control. When the drop down index of a dropdown is changed, I want to open the calendar pop up. I am exploring both the server side and client side events and methods to see which would suit my application the best. Can anyone tell me what are the methods/properties present in the raddate picker so as to open the pop up
Thanks
Nirmal
4 Answers, 1 is accepted
0
Princy
Top achievements
Rank 2
answered on 24 Aug 2009, 05:23 AM
Hi Nirmal,
You could use the showPopup() clientside method of RadDatePicker in order to show the popup when the dropdown selection is changed. See the example.
ASPX:
JavaScript:
Also checkout the following link to know more about most important methods of the RadDatePicker client-side object.
RadDatePicker Client Object
Thanks,
Princy.
You could use the showPopup() clientside method of RadDatePicker in order to show the popup when the dropdown selection is changed. See the example.
ASPX:
| <telerik:RadComboBox ID="RadComboBox1" runat="server" OnClientSelectedIndexChanged="OnClientSelectedIndexChanged"> |
| <Items> |
| . . . |
| </Items> |
| </telerik:RadComboBox> |
| <telerik:RadDatePicker ID="RadDatePicker1" runat="server"> |
| </telerik:RadDatePicker> |
JavaScript:
| <script type="text/javascript"> |
| function OnClientSelectedIndexChanged() |
| { |
| var datepicker = $find("<%= RadDatePicker1.ClientID %>"); |
| datepicker.showPopup(); |
| } |
| </script> |
Also checkout the following link to know more about most important methods of the RadDatePicker client-side object.
RadDatePicker Client Object
Thanks,
Princy.
0
nirmal
Top achievements
Rank 1
answered on 24 Aug 2009, 09:13 AM
Hi Princy...thanks for the response. however i wanted to do the same from server side. Is there anyway I can achieve this ?
0
Hello Nirmal,
Unfortunately you can not set the calendar popup to be open on the server out of the box. However you can register a client script that will be sent to the browser. There you can make the calendar popup open like this:
I hope this helps.
Regards,
Martin
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Unfortunately you can not set the calendar popup to be open on the server out of the box. However you can register a client script that will be sent to the browser. There you can make the calendar popup open like this:
| protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e) |
| { |
| ScriptManager.RegisterStartupScript(ScriptManager1, typeof(Page), "MyScript", "function pageLoad(){var datepicker = $find('RadDatePicker1');datepicker.showPopup()};", true); |
| } |
I hope this helps.
Regards,
Martin
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
nirmal
Top achievements
Rank 1
answered on 25 Aug 2009, 07:25 AM
Hey Martin,
Thankyou very much for the post.