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

Resize appointment via Javascript

2 Answers 81 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Augeneer
Top achievements
Rank 1
Augeneer asked on 23 Feb 2011, 02:58 AM
Hi,

I have a requirement whereby I need to be able to resize an appointment as it is being dragged by the user [multiple appointments are not allowed in the same slot]. Not allowing an appointment in an already used slot has been done, but I am having trouble with the second part of this requirement. As I see it, to do this I will have to be able to:
 - look at a the time-slots that are at each side of the current target_slot
 - check to see if there are any appointments in either of these slots
 - If there are, resize the current appointment.

The trouble i have at the moment is that I am not sure how to get the adjacent slots.
How do I go about doing this?

regards
Augeneer

2 Answers, 1 is accepted

Sort by
0
Augeneer
Top achievements
Rank 1
answered on 23 Feb 2011, 11:36 PM
OK,

I think I was looking at this wrong way.
I think the best approach here would be to work with the OnClientAppointmentMoveEnd event.
Once the move is complete, the asses where the appointment has been placed and check for any empty slots around.
Then move the appointment and resize if necessary...

The problem then comes when doing the move.

Because we are using the OnClientAppointmentMoveEnd  when the start date is updated through the analysis of the slots around the appointment, the update is lost. This is because OnClientAppointmentMoveEnd has not applied the update of the move as yet.

How do we get around this? 
If we cancel then we will get a double movement of the appointment going back to the original position and then move to the empty slot we have found for it....

Any help is appreciated,

Regards
Augeneer
0
Veronica
Telerik team
answered on 01 Mar 2011, 09:36 AM
Hello Augeneer,

I'm not sure if I got your requirement.
Could you please send me a sample project and try to explain once again what do you want to achieve?

Thank you!

All the best,
Veronica Milcheva
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
Scheduler
Asked by
Augeneer
Top achievements
Rank 1
Answers by
Augeneer
Top achievements
Rank 1
Veronica
Telerik team
Share this question
or