using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;

public partial class Default4 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void RadCalendar_DayRender(object sender, Telerik.Web.UI.Calendar.DayRenderEventArgs e)
    {
        //if (DateTime.Compare(e.Day.Date, DateTime.Today) < 0)
        //{
        //    e.Cell.ToolTip = "test";
        //    return;
        //}

        RadCalendarDay calendarDay = new RadCalendarDay();
        if (e.Day.Date.DayOfWeek == DayOfWeek.Monday) return;
        e.Cell.CssClass = "rcOutOfRange";
        e.Cell.ToolTip = "Only Mondays are enabled for selection.";

        Label label = new Label { Text = e.Day.Date.Day.ToString() };
        e.Cell.Controls.Add(label);

        calendarDay.Date = e.Day.Date;
        calendarDay.IsSelectable = false;
        calendarDay.IsDisabled = true;
        RadCalendar.SpecialDays.Add(calendarDay);
    }
}
