我有以下rad日期选择器的定义:
<telerik:RadDatePicker ID="calStartUsingDate" runat="server" DateFormat="dd/MM/yyyy">
<ClientEvents OnDateSelected="calcConsump" />
</telerik:RadDatePicker>
我试图获取它的选定日期,但以下语句总是返回null !!
start = $find("<%=calStartUsingDate.ClientID %>");
答案 0 :(得分:0)
在OnDateSelected函数之外使用它:
var start = $find("<%=calStartUsingDate.ClientID %>").get_selectedDate();
如果你在OnDateSelected函数中使用它,它看起来像......
function calcConsump(sender, args){
var start = sender.get_selectedDate();
}
http://www.telerik.com/help/aspnet-ajax/calendar-client-side-rad-datepicker.html