Calendar.SelectedDate

X

Xarky

Hi,
I am placing a Calendar on my page. Now I am dynamically changing the
selected date property. The Calendar remains on today's date. I
would like to show the date that has been set by me with the use of
the property

myCalendar.SelectedDate = myDate

Can someone help me out
Thanks in Advance
 
K

Ken Cox [Microsoft MVP]

You need to set both the SelectedDate and the VisibleDate properties:

Calendar1.SelectedDate = Now
Calendar1.VisibleDate = Now

Ken
Microsoft MVP [ASP.NET]
Toronto
 
G

Guest

Hi Xarky,

when do you set the SelectedDate property of the Calendar control? AFAIK you
must do it before OnPreRender.

Patrick
 

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

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,010
Latest member
MerrillEic

Latest Threads

Top