When I resize startTime of appointment it works but when I re-size endTime of appointment it does not work.
Current Time is 11:00 to 11:30. When I re-size startTime to 9:00 it works. Now Time is 9:00 to 11:30. But when I resize endTime to 14:00 e.ModifiecdAppointment still is 11:30!
1 Answer, 1 is accepted
0
Plamen
Telerik team
answered on 01 May 2013, 07:04 AM
Hello shahab,
This seems to be an issue caused by the internal functionality of RadScheduler when its Global.asax file is overriden. You can overcome the issue by handling OnClientAppointmentResizeEnd client event and passing the new time to a hidden field as in the code below:
function OnClientAppointmentResizeEnd(sender,args) {
var AppointmentResizeEndTime = document.getElementById("AppointmentResizeEndTime");
var endTime = args.get_newEndTime().format("HH:mm");
if (e.ModifiedAppointment.Start > e.ModifiedAppointment.End)
{
e.Cancel = true;
//TODO: Exceptio Handeling
throw new Exception("start time must be before end time");
}
}
Hope this will be helpful.
All the best,
Plamen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.