Tips and tricks for .NET using ASP and VB code.

Do not allow future dates in calendar control

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

No comments:

Post a Comment

Search This Blog