Hi,
It is possible to make the Calendar control to show only two weeks from today?
Thank you,
Sorin
Printable View
Hi,
It is possible to make the Calendar control to show only two weeks from today?
Thank you,
Sorin
This should do the trick:
Code:
Private Sub cal_DayRender(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DayRenderEventArgs) Handles cal.DayRender
If e.Day.Date > Now.AddDays(15) Then
e.Cell.Text = ""
End If
If e.Day.Date < Now.ToShortDateString Then
e.Cell.Text = ""
End If
End Sub
Very cool solution.
Thank you very much.