Re-setting the SelectedDate on a Calendar Control

SteveoAtilla

Regular
Joined
Dec 22, 2004
Messages
80
Location
The Frozen Tundra
Hello!

I have a page that uses the same calendar control to set multiple dates. I do this by setting a Session variable to determine which date is being set.

The problem is, after the control is used once and set to invisible, the next button is clicked, the control is re-displayed, but the first date is selected, or I can re-set it to today, but I can't TURN IT OFF.

Any ideas? I've tried

Visual Basic:
calPickDate.SelectedDate = 0

but that gives an error.

Help!

Thanks,

Kahuna
 
not sure what you are asking, when you selected a date, you hide it, click the next button, show the calendar, but want to reset the calednar so that no dates are selected? if that is the case, when you first display the calendar without any selected dates, response.write the calendar's selccted date, it will be '1/1/0000' or something. when you reset the calendar, try setting the selectedate to that.
 
That's the ticket!

kahlua001 said:
... if that is the case, when you first display the calendar without any selected dates, response.write the calendar's selccted date, it will be '1/1/0000' or something. when you reset the calendar, try setting the selectedate to that.
Kahlua,

That was it exactly. I didn't know if there was a way to turn off any selection, but setting it to 1/1/0001 does the same thing.

Thanks!

Kahuna
 
Back
Top