I am using OnClientAppointmentMoveEnd to determine if the user is trying to move an appointment to a disabled timeslot:
function
onAppointmentMoveEnd(sender, args) {
var
start = args.get_targetSlot().get_startTime();
var
end =
new
Date(start.getTime() + args.get_appointment().get_duration());
var
slotElement = $telerik.$(args.get_targetSlot().get_domElement());
if
(slotElement.is(
".Disabled"
) || slotElement.parent().is(
".Disabled"
)) {
// Prevent appointment move to disabled timeslots.
alert(
"This venue is not available in this time period."
);
args.set_cancel(
true
);
}
warnIfOccupied(start, end, sender, args);
}
It runs without an error but it also skips over the conditional statement when it shouldn't.
I can verify that this works when I use it on the event OnClientAppointmentResizeEnd. This code works correctly and stops the user dragging the appointment into a disabled area:
function
onAppointmentResizeEnd(sender, args) {
var
start = args.get_appointment().get_start();
var
end = args.get_targetSlot().get_endTime();
warnIfOccupied(start, end, sender, args);
var
slotElement = $telerik.$(args.get_targetSlot().get_domElement());
if
(slotElement.is(
".Disabled"
) || slotElement.parent().is(
".Disabled"
)) {
// Prevent appointment move to disabled timeslots.
alert(
"This venue is not available in this time period."
);
args.set_cancel(
true
);
}
}
It seems that the (slotElement.is(".Disabled") || slotElement.parent().is(".Disabled")) is not available to the OnClientAppointmentMoveEnd event.
Please advise if I am simply "doing it wrong" or, if this is in fact, a bug.
Thanks.
11 Answers, 1 is accepted
I was able to replicate the problem too, but I am not sure what exactly is causing it. It is indeed strange, that this approach works for onClientApponitmentInserting as well, but not for onClientAppointmentMoveEnd. We will investigate the issue, but in the meantime you can handle the server-side AppointmentUpdate event as shown in this kb article. I hope this is an acceptable workaround for you
Peter
the Telerik team

The server-side is less than ideal for me, I've implemented it but am hoping this bug will be fixed shortly, or a clientside workaround can be posted?
I will escalate this issue to the attention of our developers. However, I can't say for sure when it will be fixed.
Greetings,
Peter
the Telerik team

-Raghav Gangaraju
There is good chance that we will be able to fix the bug for the upcoming Q1 2011 release.
Thanks for your inquiry.
Greetings,
Peter
the Telerik team

Hi,
I am using 2011 Q1 release and the problem still exists
OnClientAppointmentMoveEnd called "SchMove" below.
"Series.IsSeries" is a web service called from javascript
When the web service js call-back function fires, it calls an alert('test');
Removing the alert appears to fix’s the issue.
function SchMove(sender, args) {
alert('move');
args.set_cancel(true);
CurrentApp = args.get_appointment();
Series.IsSeries(CurrentApp.get_id(), CallbackSeries);
}
Unfortunately, we still haven't gotten to this problem. Please, accept our apologies for any inconvenience caused by this.
All the best,
Peter
the Telerik team

Back in September we worked in a server-side solution and decided to revisit the issue this summer, we want to redesign our application using web services and client-side code, but this bug was preventing us last year from working in all the features that our scheduler requires.
Now we're ready to redesign it client-side, but the bug has still not been fixed? Is this to be included in a Q1 SP2 or the next release at least?
We will do our best to fix the problem for the upcoming service pack.
Best wishes,
Peter
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
We believe we have fixed the problem. You can try with the latest internal build that will be uploaded by the end of this week. Unfortunately we didn't have time to commit the changes to the official version of service pack 2.
Kind regards,
Peter
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Thanks for working this one in this week. We hope to update to a web services solution soon.