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

    Hi,

    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
            div.Controls.Add(label)
            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
            div1.Controls.Add(label1)
            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
                radCal1.SpecialDays.Add(calendarDay)
                e.Cell.BackColor = Drawing.Color.LightYellow 
            End If
            div.Attributes.Add("class", "CalG")
            div1.Attributes.Add("class", "CalH")
            e.Cell.Controls.Add(div)
            e.Cell.Controls.Add(div1)
        End Sub

    Thnx in advance.
  2. Milena
    Admin
    Milena avatar
    224 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.

    Regards,
    Milena
    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. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top