Hi,
I am trying to get the selected time range for a new appointment and am getting incorrect information passed into the OnClientAppointmentInserting method. As shown in the screen shot "appointment selection.jpg" I select a time period of 10:30 am to 12:30 pm, I then right click and select new appointment. When the OnClientAppointmentInserting method is fired the start time is now 12:00 pm and the end time is now 12:15 pm (see "timeslot.jpg").
Am I missing something or is this an issue with the OnClientAppointmentInserting event?
Thanks
Gavin.
Here is my code
<telerik:RadScheduler ID="rsAppointments" runat="server" DataEndField="AppointmentEndDate" DataKeyField="PatientAppointmentID" DataStartField="AppointmentStartDate" DataSubjectField="AppointmentTypeID" DataDescriptionField="AppointmentTypeID" Height="600px" MinutesPerRow="15" onnavigationcomplete="rsAppointments_NavigationComplete" OnClientAppointmentInserting="OnInsertAppointment" OnClientAppointmentEditing="OnEditAppointment" GroupBy="Clinicians" onappointmentcreated="rsAppointments_AppointmentCreated" onappointmentupdate="rsAppointments_AppointmentUpdate" onappointmentdelete="rsAppointments_AppointmentDelete"> <TimelineView UserSelectable="False" /> <ResourceTypes> <telerik:ResourceType Name="Clinicians" KeyField="UserID" TextField="ClinicianName" ForeignKeyField="ClinicianID" /> </ResourceTypes> <AppointmentTemplate> <table border="0" cellpadding="3" cellspacing="0" width="100%"> <tr> <td style="border: none;" rowspan="2"><asp:Literal ID="litContent" runat="server"></asp:Literal></td> </tr> </table> </AppointmentTemplate> <AppointmentContextMenuSettings EnableDefault="true" /> <TimeSlotContextMenuSettings EnableDefault="true" /> </telerik:RadScheduler>function OnInsertAppointment(sender, args) { var slot = args.get_targetSlot(); var dteStart = slot.get_startTime(); var dteEnd = slot.get_endTime(); var res = slot.get_resource(); var resourceID = res.get_key(); var oManager = GetRadWindowManager(); var oWnd = oManager.getWindowByName("rwAppointment"); var URL = "AppointmentEdit.aspx?mode=insert&start=" + dteStart.toString("dd/MM/yyyy HH:mm:ss tt") + "&end=" + dteEnd.toString("dd/MM/yyyy HH:mm:ss tt") + "&cID=" + resourceID + "&pid=" + <%= PatientID %>; oWnd.setUrl(URL); oWnd.show(); args.set_cancel(true); }