Calendar customization issues on hosting

2 posts, 0 answers
  1. Remya
    Remya avatar
    30 posts
    Member since:
    Feb 2012

    Posted 26 Mar 2012 Link to this post


    I had customized my radcalendar for displaying Hijri dates along with Gregorian.It works fine on my local machine but when hosting the Hijri dates from 13th to last date of every month is invisible.I am attaching a screenshot along with this for your reference.

    Here my code is;

    Protected Sub RadCalendar1_DayRender(ByVal sender As Object, ByVal e As Telerik.Web.UI.Calendar.DayRenderEventArgs) Handles radCal1.DayRender
            Dim label As New Label()
            Dim div As HtmlGenericControl = New HtmlGenericControl("div")
            div.Attributes.Add("class", "CalG")
            label.Text = e.Day.[Date].Day.ToString()  'Gregorian Day
            Dim div1 As HtmlGenericControl = New HtmlGenericControl("div")
            div1.Attributes.Add("class", "CalH")
            Dim label1 As Label = New Label()
            label1.ForeColor = Drawing.Color.Brown
            Dim d As DateTime = e.Day.Date
            Dim objDateConv As New DatesConversion
            label1.Font.Size = FontSize.Small
            label1.Height = "5"
            label1.Text = objDateConv.GregToHijri(d, "Day") & "/" & objDateConv.GregToHijri(d, "Month")  'hijri Day and month
            If e.Day.Date.DayOfWeek = 4 Then  'Disable week day
                Dim calendarSkin = radCal1.Skin
                If (calendarSkin = "") Then
                    calendarSkin = "Default"
                End If
                Dim otherMonthCssClass As String = String.Format("otherMonth_{0}", calendarSkin)
                e.Cell.Text = ""
                e.Cell.CssClass = otherMonthCssClass ' set new CssClass for the disabled calendar day cells (e.g. look like other month days here)
                Dim calendarDay As RadCalendarDay = New RadCalendarDay
                calendarDay.Date = e.Day.Date
                calendarDay.IsSelectable = False
                calendarDay.ItemStyle.CssClass = otherMonthCssClass
                e.Cell.BackColor = Drawing.Color.LightYellow 
            End If
            div.Attributes.Add("class", "CalG")
            div1.Attributes.Add("class", "CalH")
        End Sub

    Thnx in advance.
  2. Milena
    Milena avatar
    223 posts

    Posted 29 Mar 2012 Link to this post

    Hello Remya,

    RadCalendar supports all the cultures in the System.Globalization namespace that are based only on the Gregorian calendar. We are not able to provide you a solution for your custom implementation, because it is out of our scope.

    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.
  3. DevCraft R3 2016 release webinar banner
Back to Top