OnClientAppointmentResizing Resulting Appointment Times

2 posts, 1 answers
  1. Sam
    Sam avatar
    10 posts
    Member since:
    Nov 2012

    Posted 30 Jan 2013 Link to this post

    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.


  2. Answer
    Boyan Dimitrov
    Boyan Dimitrov avatar
    2062 posts

    Posted 01 Feb 2013 Link to this post

    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.

    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.
Back to Top