Fog Creek Software
Discussion Board

Welcome! and rules

Joel on Software

Calendar control

Hello Everyone,

I have a questioon regarding the calendar control in  Is there a way to make all days before today unselectable?
This calendar is for setting up demos, and I want the users to select only today or future days.


Friday, September 10, 2004

There is a DayRender event on the calendar control.  As each day is created you can modify its properties.


Private Sub Calendar1_DayRender(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DayRenderEventArgs) Handles Calendar1.DayRender
        If e.Day.Date < Today() Then
            e.Day.IsSelectable = False
        End If
    End Sub

Friday, September 10, 2004

Thanks, that will help.

Friday, September 10, 2004

*  Recent Topics

*  Fog Creek Home