Unplanned
Last Updated: 10 Jul 2019 08:00 by ADMIN
Lee Nessling
Created on: 10 Jul 2019 07:56
Category: Scheduler
Type: Bug Report
1
Radscheduler not showing appts prior to business hours on previous days when using WebService.
When the server's timezone is set to UTC-2 and timezones with bigger negative offset (e.g.  (UTC-08:00) Pacific Time (US & Canada) and (UTC-07:00) Mountain Time (US & Canada)) the appointments on July 1st at 1:30AM are not rendered.
1 comment
ADMIN
Peter Milchev
Posted on: 10 Jul 2019 08:00
Hello Lee,

Thank you for providing the Timezones, I was also able to replicate the issue once the Timezone was set as Pacific. 

The issue then is caused by the fact that the internal .toClientDate returns Invalid date for these date ranges. 

The following workaround can be used to show the appointment on the 1st July. It can be placed under the ScriptManager. 

Telerik.Web.UI.Scheduler.Rendering.WebServiceRenderingManager.prototype._loadAppointment = function (aptData) {
    var startString = aptData.Start;
  
    var startDate = this._toClientDate(startString)
    if (isNaN(startDate.getTime())) {  // d.valueOf() could also work
        // date is not valid
        aptData.Start = new Date(startString)
    }
    var endString = aptData.End;
    var endDate = this._toClientDate(endString)
    if (isNaN(endDate.getTime())) {  // d.valueOf() could also work
        // date is not valid
        aptData.End = new Date(endString)
    }
  
    var appointment = new Telerik.Web.UI.SchedulerAppointment();
  
    appointment._id = aptData.ID;
    appointment._internalID = aptData.EncodedID;
    appointment.set_subject(aptData.Subject);
    appointment.set_description(aptData.Description);
    appointment.set_start(this._toClientDate(aptData.Start));
    appointment.set_end(this._toClientDate(aptData.End));
    appointment._setOwner(this._owner);
    appointment._recurrenceRule = aptData.RecurrenceRule;
    appointment._recurrenceParentID = aptData.RecurrenceParentID;
    appointment._internalRecurrenceParentID = aptData.EncodedRecurrenceParentID;
    appointment._recurrenceState = aptData.RecurrenceState;
    appointment._visible = aptData.Visible;
    appointment.set_toolTip(aptData.Subject);
    appointment.set_timeZoneID(aptData.TimeZoneID);
  
    if (aptData.Resources)
        this._loadResources(appointment.get_resources(), aptData.Resources);
  
    if (aptData.Attributes)
        this._loadAttributes(appointment.get_attributes(), aptData.Attributes);
  
    if (aptData.Reminders && appointment.get_reminders)
        this._loadReminders(appointment, aptData.Reminders);
  
    return appointment;
}


Regards,
Peter Milchev
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.