Postback with the Calendar Control

G

Guest

Why is it all controls with an Autopostback feature report their values in the Page Load, but the calendar control's selecteddate value doesn't change till it hits the Selection_Changed Event. Is there anyway around this? My issue stems from a page that contains a user custom webcontrol that accepts the currently selected date from a calendar control, yet it is always 1 click behind. I have other custom webcontrols that accept input form dropdown lists that populate correctly because the selectedvalue attribute of the object is update on page load, but the calendar does not, so the data displayed from the date never matches the data displayed from the dropdown.
 
P

Peter O'Reilly

Yes, I've noticed that too with the calendar control. I consider it a big
design flaw. It is one that if I had not been well into my code
implementation, I would have rolled my own calendar control. I could not
find an optimal way to work around this. Instead, I end up executing some
code, 2xs, in two different server events each time the page is requested on
a postback.
Not good, I know, but the cost of a rewrite is greater than the
load/frequency this page is used in my application.
 

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,733
Messages
2,569,440
Members
44,831
Latest member
HealthSmartketoReviews

Latest Threads

Top