Disable all Monday or any other weekdays

2 posts, 1 answers
  1. Hassan
    Hassan avatar
    145 posts
    Member since:
    Aug 2010

    Posted 08 Feb 2011 Link to this post

    Hello. I need to know if it is possible for me to somehow disable certain weekdays (Mon - Sun) on the RadCalendar?
  2. Answer
    Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 08 Feb 2011 Link to this post

    Hi Hassan,

    Hope you're well. This will leave just Saturdays enabled

    Private Sub RadCalendar1_ElementRender(ByVal sender As System.Object, ByVal e As Telerik.WinControls.UI.RenderElementEventArgs) Handles RadCalendar1.ElementRender
        If Not String.Equals(e.Day.Date.DayOfWeek.ToString(), "Saturday") Then
            e.Element.Enabled = False
        End If
    End Sub

    Hope that helps
Back to Top