setting calendar.selectedDate using code?

V

Victor Reboucas

Hi, I'm sure I'm missing something here, but....

I have a asp.net 2.0 web form and a calendar control.

If I set the selectedDate clicking the control, no problem, but, if I set it
using code I cannot get the visual demonstration of the selectedDate...

I mean, if I check the selectedDate using code I can get it, but it's not
shown visually.


PS: it's not about the VisibleDate property, this property works just fine


Thanks for any clue.
Regards
Victor
 
V

Victor Reboucas

Hi Gozirra,

That's what I'm doing... setting the selectedDate and visibleDate in code,
and the "visual demonstration" of the calendar control do not get updated...


regards,
Victor
 
V

Victor Reboucas

Well, well, the answer is: you cannot set the selectedDate property to any
date/datetime variable that holds hour, minute or seconds different than 0.

If you set it like: cld.selectedDate = new DateTime(2006,12,29,0,0,0) - It
works just fine...

but if you set it like: cld.selectedDate = new DateTime(2006,12,29,0,0,1) -
The calendar control holds the correct dateTime valeu but do not mark the
day as selected visually.

PS: this was not the behavior in asp.net 1.0 / 1.1, where both approaches
work fine.


regards,
Victor
 

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,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top