Hi guys,
--------------------------------
Other question :
In the scheduler, I want to make MinutesperRow = 60 and show each hour displayed in one row Like :
8am
9am
10am
....
Each hour shows one Row only of 60 minutes
I am trying to get the endtime of the appoitment on OnClientAppointmentMoveEnd client-side event.
The idea is that I want to restrict the user from bypassing the business hours set ( 9am - 6pm) while he is updating the apointment from client side.
I have the code to cancel the event but I am not able to find the new endtime of the appointment when he finishes dragging.
| function appointmentMoveEnd(sender, args) { |
| debugger; |
| var targetSlot = args.get_targetSlot(); |
| var startTime = targetSlot.get_startTime(); |
| var startTime = targetSlot.get_startTime(); |
| var appointment = args.get_appointment(); |
| var originalStartTime = appointment.get_start(); |
| var newHour = originalStartTime.getHours(); |
| var newMinute = originalStartTime.getMinutes(); |
| var newSecond = originalStartTime.getSeconds(); |
| startTime.setHours(newHour); |
| startTime.setMinutes(newMinute); |
| startTime.setSeconds(newSecond); |
| var endTime = new Date(startTime.getTime() + appointment._getDuration()); |
| var date = args.get_appointment().get_end(); |
| alert(date); |
| args.get_appointment().get_element().style.border = "1px solid Orange"; |
| args.set_cancel(true); |
| } |
The above code is just an experimentation.
I just want to get the new endtime and see if the end time is outside the business hours so I can cancel updating.
--------------------------------
Other question :
In the scheduler, I want to make MinutesperRow = 60 and show each hour displayed in one row Like :
8am
9am
10am
....
Each hour shows one Row only of 60 minutes
Thanks a lot.