Telerik RadCalendar ASP.NET control reset date

怎甘沉沦 提交于 2020-01-16 17:03:18

问题


I use Telerik RadCalendar ASP.NET control. How I can in code reset selected date? (Set no selected Date)


回答1:


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.




回答2:


If you want to clear the selection server-side then this should work:

RadCalendarObject.SelectedDates.Clear();


来源:https://stackoverflow.com/questions/2509537/telerik-radcalendar-asp-net-control-reset-date

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!