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

Appointment is invalid: Start time must be before the End time

1 Answer 124 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
E
Top achievements
Rank 1
E asked on 09 Oct 2017, 07:15 PM

I'm trying to figure out what method this error is coming from (Full error text at bottom below code snippet). Our global.asax records every error in our site, and this comes up on a regular basis. Nobody has reported an issue, nor can I reproduce it any way I've attempted. It has come up a few times a day until last month, where it suddenly started showing up 50-100 times a day, around when the latest chrome update came out. It seems like every time, the browser info is the newest version of Chrome as of today (Chrome/61.0.3163.100).

From what I can tell in the error message, it seems it's during resize while on the week view. I use scheduler method OnAppointmentUpdate to resize via server side. In theory, my try/catch there should handle this error, but I never get my error email, so it must be coming up prior to hitting that method. 

If anyone has any ideas, I would appreciate any insight.

Here is my OnAppointmentUpdate method:

protected void Schedule_AppointmentUpdate(object sender, AppointmentUpdateEventArgs e)
  {
    try
    {
      Appointment oAppt = e.ModifiedAppointment;

      if (e.Appointment.Start >= e.Appointment.End)
      {
        e.Cancel = true;        
        Notify.Error(this.Page, "Start time must be before end time.");
        return;
      }
      
        if (!EditAppointmentViaResizeMove(oAppt, ""))
          e.Cancel = true;        
      }
    }
    catch (Exception ex)
    {
      SendErrorEmail("Error on appointment update: " + ex.Message));
    }
  }

And, this is the message that hits my global.asax error handler:

 

Message: Exception of type 'System.Web.HttpUnhandledException' was thrown.

Stack Trace: at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.portal_appointments_aspx.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Inner Exception 1: Appointment is invalid: Start time must be before the End time.

Inner Trace 1: at Telerik.Web.UI.Appointment.Validate() at Telerik.Web.UI.Scheduling.AppointmentController.UpdateAppointmentThroughProvider(ISchedulerInfo schedulerInfo, Appointment appointmentToUpdate) at Telerik.Web.UI.Scheduling.AppointmentController.UpdateAppointment(ISchedulerInfo schedulerInfo, Appointment originalAppointment, Appointment modifiedAppointment) at Telerik.Web.UI.RadScheduler.FinishResize(Appointment originalAppointment, Appointment modifiedAppointment) at Telerik.Web.UI.RadScheduler.ResizeAppointment(Appointment appointmentToResize, DateTime appointmentStart, DateTime appointmentEnd, Boolean editSeries) at Telerik.Web.UI.RadScheduler.Telerik.Web.UI.IScheduler.HandleResize(Appointment appointmentToResize, DateTime appointmentStart, DateTime appointmentEnd, Boolean editSeries) at Telerik.Web.UI.Scheduler.Views.Week.Model.HandleResize(Appointment appointment, ISchedulerTimeSlot sourceSlot, DateTime appointmentStart, DateTime appointmentEnd, Boolean editSeries) at Telerik.Web.UI.Scheduler.Views.Week.GroupedByResource.Model.HandleResize(Appointment appointment, ISchedulerTimeSlot sourceSlot, DateTime appointmentStart, DateTime appointmentEnd, Boolean editSeries) at Telerik.Web.UI.Scheduler.Views.SchedulerModel.ProcessPostBackCommand(SchedulerPostBackEvent postBack) at Telerik.Web.UI.RadScheduler.ProcessPostBackCommand(SchedulerPostBackEvent postBack) at Telerik.Web.UI.RadScheduler.RaisePostBackEvent(String eventArgument) at Telerik.Web.UI.RadScheduler.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

BROWSER INFO:

Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36

1 Answer, 1 is accepted

Sort by
0
Peter Milchev
Telerik team
answered on 18 Oct 2017, 03:28 PM
Hello Anthony,

Version 61 of the Google Chrome introduces some breaking changes in the behavior of the browser which may lead to such issues when the browser is scrolled. 

More information can be found here: https://www.telerik.com/forums/appointment-is-invalid-and-cannot-read-property-errors-for-scheduler-in-chrome-61.

As a token of gratitude for helping us identify the issue, we have updated your Telerik points.

Regards,
Peter Milchev
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Scheduler
Asked by
E
Top achievements
Rank 1
Answers by
Peter Milchev
Telerik team
Share this question
or