How to assign today as selected date on calendar control

  • Thread starter Thread starter KatB
  • Start date Start date
K

KatB

I have a calendar control which renders on page load. I need the initial
rendering to have a selected day (today) and not wait for the first
SelectionChanged event to occur.

Any suggestions?

Thanks, Kat
 
Not sure what you mean, but maybe it is just to set the SelectedDate and
VisibleDate to Now as shown below?

Private Sub Page_Load _
(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles MyBase.Load
Calendar1.SelectedDate = Now
Calendar1.VisibleDate = Now
End Sub

Ken
Microsoft MVP [ASP.NET]
Toronto
 
Back
Top