Calendar: detect when selected day is clicked

B

Ben Amada

Hi,

I'm using the built-in calendar control. One problem I'm having is that if
the user clicks on the day in the calendar which is already the
SelectedDate, a postback occurs, but the SelectionChanged event doesn't
fire.

Is there anyway to disable the SelectedDate link so the user can't click on
it? Or even better, is there a way to detect whether the same day was
clicked or not? I tried checking the SelectedDate value in the Page_Load
event, but in the Page_Load event the SelectedDate value hasn't been updated
yet to the date that was clicked on -- so I can't determine whether the same
day was clicked on or a different day was clicked on.

Thanks in advance for any help!
Ben
 
B

Ben Amada

Ben said:
Or even better, is there a way to detect whether the same day was
clicked or not? I tried checking the SelectedDate value in the Page_Load
event, but in the Page_Load event the SelectedDate value hasn't been
updated yet to the date that was clicked on -- so I can't determine
whether the same day was clicked on or a different day was clicked on.

I found that I can check in Page_PreRender whether or not the same day was
clicked or not. Problem fixed...

Thanks,
Ben
 

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,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top