I am trying to update the time in timepicker when the time is selected. However, when i try to update the time, the OnDateSelected handler is called, causing an infinite loop. How can I disable the event handler temporarily so I can update the time?
<telerik:RadTimePicker ID="uxStartTime" runat="server" Skin="Default" TimeView-RenderDirection="Horizontal" |
Width="85px" ClientEvents-OnDateSelected="dateSelected" TimeView-Interval="0:30" |
TimeView-Columns="4" EnableTyping="false" /> |
function dateSelected(sender, eventArgs) |
{ |
var endTime = sender.get_selectedDate(); |
endTime.setMinutes(endTime.getMinutes() + 10); |
sender.set_selectedDate(endTime); |
} |