tags:

views:

22

answers:

1

I am using asp.net calendar with ajax extension in my project.

I want to restrict users from selecting current and old dates in the calendar when they are selecting Next appointment using the calendar.

Help me please.

A: 

Hook up to the DayRender event

protected void SomeCalendar_DayRender(object sender, DayRenderEventArgs e)
{
    if (e.Day.Date < DateTime.Now)
    {
        e.Cell.Text = e.Day.Date.Day.ToString();
    }
}
Marko