Telerik RadCalendar ASP.NET control reset date
I use Telerik RadCalendar AS开发者_如何转开发P.NET control. How I can in code reset selected date? (Set no selected Date)
From their site: http://demos.telerik.com/aspnet-ajax/calendar/examples/programming/clientsideapi/defaultcs.aspx
unselectDate(date); //Takes a triplet representation of a date and if valid deselects it in the calendar.
unselectDates(dates); //Takes an array of triplets representing dates and if valid deselects them in the calendar.
First you can find what dates are selected with get_selectedDates() Then put them in the unselect method.
var selectedDates = get_selectedDates();
unselectDates(selectedDates);
If you dont know what dates are selected maybe you can reload the calendar.
If you want to clear the selection server-side then this should work:
RadCalendarObject.SelectedDates.Clear();
精彩评论