I have this property of the RadScheduler: OnClientAppointmentMoveEnd="AppointmentMoveEnd", below is the javascript for the function. It fires after you move an appointment in the scheduler.
<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
<script type="text/javascript">
function AppointmentMoveEnd(sender, eventArgs)
{
var ajaxManager = $find("<%=RadAjaxManager1.ClientID%>");
var apt = eventArgs.get_appointment();
var newStartTime = eventArgs.get_newStartTime();
alert(newStartTime);
ajaxManager.ajaxRequest(newStartTime);
}
</script>
</telerik:RadScriptBlock>
So looking at this line above (ajaxManager.ajaxRequest(newStartTime);) - this calls my C# server side code, in there I try to convert newStartTime to a .NET DateTime object, but the string looks like this:
"Sun Jun 29 2008 09:00:00 GMT-0500 (Central Daylight Time)"
- the above does not convert to a DateTime object (using Convert.ToDateTime()). I could obviously manipulate this with javascript to work, but is there somethign built in that i can use? RadControls are developed for .NET code, you think it would convert to a .NET convertable string object. It would probably work if the 'Sun' part was not there. Thank you
<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
<script type="text/javascript">
function AppointmentMoveEnd(sender, eventArgs)
{
var ajaxManager = $find("<%=RadAjaxManager1.ClientID%>");
var apt = eventArgs.get_appointment();
var newStartTime = eventArgs.get_newStartTime();
alert(newStartTime);
ajaxManager.ajaxRequest(newStartTime);
}
</script>
</telerik:RadScriptBlock>
So looking at this line above (ajaxManager.ajaxRequest(newStartTime);) - this calls my C# server side code, in there I try to convert newStartTime to a .NET DateTime object, but the string looks like this:
"Sun Jun 29 2008 09:00:00 GMT-0500 (Central Daylight Time)"
- the above does not convert to a DateTime object (using Convert.ToDateTime()). I could obviously manipulate this with javascript to work, but is there somethign built in that i can use? RadControls are developed for .NET code, you think it would convert to a .NET convertable string object. It would probably work if the 'Sun' part was not there. Thank you