How to assign today as selected date on calendar control

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
 
K

Ken Cox [Microsoft MVP]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top