Hi
I want to use the Date picker for multiple date selection. I've seen it on the calendar but couldn't find it on the date picker. My plan is to be able to take the multiple dates stored the string of dates as a delimited string and then also be able to return the string and bind it back to date picker from that delimited string.
Help?
--Mike
I want to use the Date picker for multiple date selection. I've seen it on the calendar but couldn't find it on the date picker. My plan is to be able to take the multiple dates stored the string of dates as a delimited string and then also be able to return the string and bind it back to date picker from that delimited string.
Help?
--Mike
8 Answers, 1 is accepted
0
Hello Mike,
Actually, RadDatePicker does not support selection of multiple dates at the same time.
Kind regards,
Plamen
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Actually, RadDatePicker does not support selection of multiple dates at the same time.
Kind regards,
Plamen
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
The KID
Top achievements
Rank 2
answered on 29 Aug 2008, 09:04 PM
That's unfortunate. So if i use the calendar, what would be be the best way going about storing the multiple dates so I could go back and bind them back to the calendar?
0
plamen
Top achievements
Rank 1
answered on 01 Sep 2008, 02:27 PM
hi
You can use RadCalendar control instead of RadDatePicker. Review the following online demo:
http://demos.telerik.com/aspnet/prometheus/Calendar/Examples/Functionality/MultiDaySelection/DefaultCS.aspx
Regards...
<John:Peel />
You can use RadCalendar control instead of RadDatePicker. Review the following online demo:
http://demos.telerik.com/aspnet/prometheus/Calendar/Examples/Functionality/MultiDaySelection/DefaultCS.aspx
Regards...
<John:Peel />
0
amith
Top achievements
Rank 1
answered on 08 May 2009, 07:23 AM
Hi ,
In this case if i select multiple dates from the calendar and the have a button and text box, and on click of button i need all the dates selected in the calender to get populated in text box as comma separated values. So how can i do all these on client side?
In this case if i select multiple dates from the calendar and the have a button and text box, and on click of button i need all the dates selected in the calender to get populated in text box as comma separated values. So how can i do all these on client side?
0
Princy
Top achievements
Rank 2
answered on 08 May 2009, 09:12 AM
Hi Amit,
Try the following client side code for achieving the functionality.
aspx
javascript
Thanks,
Princy.
Try the following client side code for achieving the functionality.
aspx
<telerik:RadCalendar ID="RadCalendar1" runat="server" Font-Names="Arial, Verdana, Tahoma"> |
</telerik:RadCalendar> |
<input id="Button1" type="button" value="button" onclick="getSelected();" /> |
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> |
javascript
<script type="text/javascript"> |
function getSelected() |
{ |
var d, text=''; |
var calendar = $find("<%= RadCalendar1.ClientID %>"); |
var dates = calendar.get_selectedDates(); |
for (var i = 0; i < dates.length; i++) |
{ |
var date = dates[i]; |
d= date[1] + '/' + date[2] + '/' + date[0]; |
if(i==dates.length-1) |
{ |
text = text+ d; |
} |
else |
{ |
text = d+ ',' + text; |
} |
} |
var textbox = document.getElementById('TextBox1'); |
textbox.value = text; |
} |
</script> |
Thanks,
Princy.
0
amith
Top achievements
Rank 1
answered on 08 May 2009, 12:10 PM
Hi,
Thanks for the quick reply. It worked the way i wanted.
Thanks a lot.
Thanks for the quick reply. It worked the way i wanted.
Thanks a lot.
0
vaibhav
Top achievements
Rank 1
answered on 20 Nov 2010, 07:33 AM
Where i have found get_selectedDates(); function
as i am getting error in calendar.get_selectedDates(); function.
Please help me..Its Urgent....
as i am getting error in calendar.get_selectedDates(); function.
Please help me..Its Urgent....
0
Hello vaibhav,
get_selectedDates() is client-side JavaScript function for the calendar client object.
If you want to get selected date server side from asp's code-behind use SelectedDate property of the RadCalendar.
where myCalendar is the ID of your calendar.
Best wishes,
Vasil
the Telerik team
get_selectedDates() is client-side JavaScript function for the calendar client object.
If you want to get selected date server side from asp's code-behind use SelectedDate property of the RadCalendar.
DateTime selectedDate = myCalendar.SelectedDate;
Best wishes,
Vasil
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.