Postback with the Calendar Control

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
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.
 
Back
Top