RadCalendar SpecialDays - overlap?

2 posts, 0 answers
  1. SlimSjakie
    SlimSjakie avatar
    10 posts
    Member since:
    Apr 2010

    Posted 11 Jun 2010 Link to this post

    Hi there,

    i have a calendar for which i have added a number of repeatable special days (mon - fri), after adding these i add some other specific special dates.

    However, the calendar is not rendered properly.

    Firstly, the tooltips of the repeatable days are only shown in the current month view. If you change the month, all tooltips are lost for repeatable days. When returning to the current, only tooltips are shown for the first week, not the other weeks. I find this strange and unlogic behaviour.

    Secondly, some days are shown differently in the initial month view after having navigated to another month. Also the days (weekends) that i have changed the background to red, are not shown in the initial month view, but they are shown red after i have changed months.

    Thirdly, it seems that on initial month view on one day the standard repeatable day is shown over the specific exception day, and on another day in that month it is just the other way around, the specific exception day is shown over the standard repeatable day.

    please see attached files, please advise on how to get my calendar showing proper exception days.

    thanks in advance!

    How do I make sure that the special days overrule the repeatable days? Or, what logic is used in rendering special days in the calendar?

    Here's my code:


    protected void calAfleverDatum_PreRender(object sender, EventArgs e)  
                DateTime myDate = DateTime.Today;  
                string sToolTip;              
                //-- Set Exception Days --  
                foreach (DeliveryCalendar_Exception myException in lCal_Exception)  
                    RadCalendarDay myDay = new RadCalendarDay();  
                    myDay.Date = myException.ExceptionDate;  
                    myDay.IsSelectable = myException.IsDeliveryDay;  
                    myDay.IsDisabled = !myException.IsDeliveryDay;  
                    if (myException.IsDeliveryDay)  
                        myDay.ItemStyle.BackColor = System.Drawing.ColorTranslator.FromHtml("#a2d4a2");  
                        myDay.ItemStyle.BackColor = System.Drawing.ColorTranslator.FromHtml("#e4a2a4");  
                    sToolTip = myDate.ToString("dddd, MMMM d, yyyy");  
                    if (myException.Description.Length > 0) sToolTip += "\n\n" + myException.Description;  
                    if (myException.TimeFrom != null && myException.TimeTo != null)  
                        sToolTip += "\n\nVan:  " + myException.TimeFrom.Value.ToShortTimeString() + "    Tot: " + myException.TimeTo.Value.ToShortTimeString();  
                    myDay.ToolTip = sToolTip;  
                //-- Set Standard Days --  
                while (myDate.DayOfWeek != DayOfWeek.Monday) myDate = myDate.AddDays(1);  
                foreach (DeliveryCalendar_Standard myStandard in lCal_Standard)  
                    RadCalendarDay myDay = new RadCalendarDay();  
                    myDay.Date = myDate;  
                    myDay.IsSelectable = myStandard.IsDeliveryDay;  
                    myDay.IsDisabled = !myStandard.IsDeliveryDay;  
                    myDay.Repeatable = Telerik.Web.UI.Calendar.RecurringEvents.Week;  
                    if (myStandard.IsDeliveryDay)  
                        myDay.ItemStyle.BackColor = System.Drawing.ColorTranslator.FromHtml("#a2d4a2");  
                        myDay.ItemStyle.BackColor = System.Drawing.ColorTranslator.FromHtml("#e4a2a4");  
                    sToolTip = myDate.ToString("dddd, MMMM d, yyyy");  
                    if (myStandard.TimeFrom != null && myStandard.TimeTo != null)  
                        sToolTip += "\n\nVan:  " + myStandard.TimeFrom.Value.ToShortTimeString() + "    Tot: " + myStandard.TimeTo.Value.ToShortTimeString();  
                    myDay.ToolTip = sToolTip;  
                    myDate = myDate.AddDays(1);  

  2. Iana Tsolova
    Iana Tsolova avatar
    3388 posts

    Posted 17 Jun 2010 Link to this post

    Hi Chris,

    Please find our answer in the other thread you have posted on the same subject and to avoid duplicate posts I suggest that we continue your case discussion there as well.

    All the best,
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top