开发者

Telerik RadCalendar ASP.NET control reset date

开发者 https://www.devze.com 2022-12-23 20:38 出处:网络
I use Telerik RadCalendar AS开发者_如何转开发P.NET control. How I can in code reset selected date? (Set no selected Date)From their site:

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();
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号