This is a migrated thread and some comments may be shown as answers.

OnClientAppointmentResizing Resulting Appointment Times

1 Answer 36 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Sam
Top achievements
Rank 1
Sam asked on 30 Jan 2013, 12:31 PM
Hi guys,

We have been customizing the RadScheduler for our application and it is going very well so far...we're very impressed with its capabilities. We have, however, run into a problem. We are subscribing to the OnClientAppointmentResizing event and we have the need to know the resulting size of the resized appointment during the resizing process, i.e. something like this:

function OnClientAppointmentResizing(sender, eventArgs)
{
// var newStartDate = eventArgs... (?)
// var newEndDate = eventArgs...(?)
// ...do something with these values
}

Now the eventArgs parameter only seems to give access to the appointment object (which doesn't have dynamically changing start and end times) and  to the 'target slot'. The target slot seems to be somewhat useless though...using it alone I don't believe that one can derive the resulting start and end date of the appointment because one doesn't know if the appointment is being resized from above or below.

Am I missing something here? This seems like it should be a straight-forward task. Any help would be appreciated.

Cheers,
Sam



1 Answer, 1 is accepted

Sort by
0
Accepted
Boyan Dimitrov
Telerik team
answered on 01 Feb 2013, 04:54 PM
Hello Sam,

I would like to recommend using the OnClientAppointmentResizeEnd client-side event instead of OnClientAppointmentResizing. The event arguments have the following properties that will fit your requirement:
  • eventArgs.get_newStartTime() - returns the new start time if user is resizing the upper part of the appointment - the appointment start time.
  • eventArgs.get_newEndTime() - returns the new end time if user is resizing the bottom part of the appointment - the appointment end time.

Regards,
Boyan Dimitrov
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.
Tags
Scheduler
Asked by
Sam
Top achievements
Rank 1
Answers by
Boyan Dimitrov
Telerik team
Share this question
or