Safari; events not showing

6 posts, 0 answers
  1. Sam
    Sam avatar
    20 posts
    Member since:
    Apr 2011

    Posted 08 Jan 2013 Link to this post

    I am having an issue with Safari, it appears that events on my scheduler are not showing on my iPad or my windows machine in safari. My site is:

    www.11sBlack.com  on the Schedule page.


    Thanks,
    Sam
  2. Sam
    Sam avatar
    20 posts
    Member since:
    Apr 2011

    Posted 08 Jan 2013 Link to this post

    Only in Safari this occurs. Basically on load the appointments are there but as soon as you click to move to another month they disappear.... Any ideas on this?
  3. Sam
    Sam avatar
    20 posts
    Member since:
    Apr 2011

    Posted 09 Jan 2013 Link to this post

    Anyone have any ideas on why this only happens in Safari? I need this to work on iPads.

    Thanks,
    Sam
  4. Plamen
    Admin
    Plamen avatar
    3080 posts

    Posted 11 Jan 2013 Link to this post

    Hi Sam,

     
    The issue is quite unusual and I could not reproduce it locally or in our on-line demos. Would you please provide the code and the styles that is connected to RadScheduler's implementation so we could observe the issue locally and be more helpful with a solution?

    Greetings,
    Plamen
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  5. Sam
    Sam avatar
    20 posts
    Member since:
    Apr 2011

    Posted 11 Jan 2013 Link to this post

    Sure:

    Here is the markup:

    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
       <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
           <AjaxSettings>
               <telerik:AjaxSetting AjaxControlID="RadScheduler1">
                   <UpdatedControls>
                       <telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1">
                       </telerik:AjaxUpdatedControl>
                   </UpdatedControls>
               </telerik:AjaxSetting>
           </AjaxSettings>
       </telerik:RadAjaxManager>
       <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" Skin="Default" runat="server" />
     
                   
                       <telerik:RadScheduler ID="RadScheduler1" runat="server" Height="450px"  DataKeyField="ID" DataSubjectField="Subject" DataStartField="Start" DataEndField="End"
                           DayEndTime="18:00:00" TimeZoneOffset="03:00:00" OnAppointmentInsert="RadScheduler1_AppointmentInsert"
               OnAppointmentUpdate="RadScheduler1_AppointmentUpdate" SelectedView="MonthView"  OnAppointmentDelete="RadScheduler1_AppointmentDelete" MonthView-ReadOnly="true"
               DataRecurrenceField="RecurrenceRule" DataRecurrenceParentKeyField="RecurrenceParentId"
               DataReminderField="Reminder" Skin="Office2010Black">
               <AdvancedForm Modal="true"></AdvancedForm>
               <TimelineView UserSelectable="false"></TimelineView>
                <DayView UserSelectable="false" />
               <WeekView UserSelectable="false" />
               <TimeSlotContextMenuSettings EnableDefault="true"></TimeSlotContextMenuSettings>
               <AppointmentContextMenuSettings EnableDefault="true"></AppointmentContextMenuSettings>
               <Reminders Enabled="false"></Reminders>
                       </telerik:RadScheduler>


    Here is the code behind:

    public partial class Scheduler : System.Web.UI.Page
    {
        class AppointmentInfo
        {
            private readonly string _id;
            private string _subject;
            private DateTime _start;
            private DateTime _end;
            private string _recurrenceRule;
            private string _recurrenceParentId;
            private string _reminder;
            private int? _userID;

            public string ID
            {
                get { return _id; }
            }

            public string Subject
            {
                get { return _subject; }
                set { _subject = value; }
            }

            public DateTime Start
            {
                get { return _start; }
                set { _start = value; }
            }

            public DateTime End
            {
                get { return _end; }
                set { _end = value; }
            }

            public string RecurrenceRule
            {
                get { return _recurrenceRule; }
                set { _recurrenceRule = value; }
            }

            public string RecurrenceParentID
            {
                get { return _recurrenceParentId; }
                set { _recurrenceParentId = value; }
            }

            public int? UserID
            {
                get { return _userID; }
                set { _userID = value; }
            }

            public string Reminder
            {
                get { return _reminder; }
                set { _reminder = value; }
            }

            private AppointmentInfo()
            {
                _id = Guid.NewGuid().ToString();
            }

            public AppointmentInfo(string subject, DateTime start, DateTime end,
                string recurrenceRule, string recurrenceParentID, string reminder, int? userID)
                : this()
            {
                _subject = subject;
                _start = start;
                _end = end;
                _recurrenceRule = recurrenceRule;
                _recurrenceParentId = recurrenceParentID;
                _reminder = reminder;
                _userID = userID;
            }

            public AppointmentInfo(Appointment source)
                : this()
            {
                CopyInfo(source);
            }

            public void CopyInfo(Appointment source)
            {
                Subject = source.Subject;
                Start = source.Start;
                End = source.End;
                RecurrenceRule = source.RecurrenceRule;
                if (source.RecurrenceParentID != null)
                {
                    RecurrenceParentID = source.RecurrenceParentID.ToString();
                }

                if (!String.IsNullOrEmpty(Reminder))
                {
                    Reminder = source.Reminders[0].ToString();
                }

                Resource user = source.Resources.GetResourceByType("User");
                if (user != null)
                {
                    UserID = (int?)user.Key;
                }
                else
                {
                    UserID = null;
                }
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        private const string AppointmentsKey = "Telerik.Web.Examples.Scheduler.BindToList.CS.Apts";

        private List<AppointmentInfo> Appointments
        {
            get
            {
                List<AppointmentInfo> sessApts = Session[AppointmentsKey] as List<AppointmentInfo>;
                if (sessApts == null)
                {
                    sessApts = new List<AppointmentInfo>();
                    Session[AppointmentsKey] = sessApts;
                }

                return sessApts;
            }
        }

        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            if (!IsPostBack)
            {
                Session.Remove(AppointmentsKey);

                InitializeResources();
                InitializeAppointments();
            }

            RadScheduler1.DataSource = Appointments;
        }

        protected void RadScheduler1_AppointmentInsert(object sender, SchedulerCancelEventArgs e)
        {
            Appointments.Add(new AppointmentInfo(e.Appointment));
        }

        protected void RadScheduler1_AppointmentUpdate(object sender, AppointmentUpdateEventArgs e)
        {
            AppointmentInfo ai = FindById(e.ModifiedAppointment.ID);
            ai.CopyInfo(e.ModifiedAppointment);
        }

        protected void RadScheduler1_AppointmentDelete(object sender, SchedulerCancelEventArgs e)
        {
            Appointments.Remove(FindById(e.Appointment.ID));
        }

        private void InitializeResources()
        {
            ResourceType resType = new ResourceType("User");
            resType.ForeignKeyField = "UserID";

            RadScheduler1.ResourceTypes.Add(resType);
            RadScheduler1.Resources.Add(new Resource("User", 1, "Alex"));
            RadScheduler1.Resources.Add(new Resource("User", 2, "Bob"));
            RadScheduler1.Resources.Add(new Resource("User", 3, "Charlie"));
        }

        private void InitializeAppointments()
        {
            DateTime start = DateTime.UtcNow.Date;
            start = start.AddHours(6);
            //Road to the Show
            DateTime rtsStart = new DateTime(2013, 3, 1);
            DateTime rtsEnd = new DateTime(2013, 3, 3);
            Appointments.Add(new AppointmentInfo("Road to the Show - Springdale Arkansas", rtsStart, rtsEnd, string.Empty, null, new Reminder(30).ToString(), 1));



            Appointments.Add(new AppointmentInfo("Meeting with Alex", start.AddHours(2), start.AddHours(3), string.Empty, null, string.Empty, 2));

            start = start.AddDays(-1);
            DateTime dayStart = RadScheduler1.UtcDayStart(start);
            Appointments.Add(new AppointmentInfo("Bob's Birthday", dayStart, dayStart.AddDays(1), string.Empty, null, string.Empty, 1));
            Appointments.Add(new AppointmentInfo("Call Charlie about the Project", start.AddHours(2), start.AddHours(3), string.Empty, null, string.Empty, 2));

            start = start.AddDays(2);
            Appointments.Add(new AppointmentInfo("Get the car from the service", start.AddHours(2), start.AddHours(3), string.Empty, null, string.Empty, 1));
        }

        private AppointmentInfo FindById(object ID)
        {
            foreach (AppointmentInfo ai in Appointments)
            {
                if (ai.ID.Equals(ID))
                {
                    return ai;
                }
            }

            return null;
        }
    }


    Thanks,
    Sam

  6. Plamen
    Admin
    Plamen avatar
    3080 posts

    Posted 15 Jan 2013 Link to this post

    Hello Sam,

     
    The issue is quite unusual indeed. I have inspected the mark up provided but it unfortunately it gave us not clue about the issue because didn't help use reproduce the issue locally. I am attaching my test project and here is a video of my test. Please review them and let us know if there is something else that should be added or done in order to reproduce it. 

    All the best,
    Plamen
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top