Sunday, March 11, 2012

Getting the date from the Calendar Extender control instead of target

Hi benyl,

The SelectedDate of the CalendarExtender is just to set an initial selected date on the calendar.

You can't use is to get the last selected date by the user.The selectedDate property isn't updated to the date the user selects!!

Solution:

You should get the last selected date out of a textbox where the calendarExtender places his selected date. If you don't want users to see that textbox, you can always hide it with css.

Please let me know if that works out for you!

Kind regards,
Wim


Thanks. That is what I thought. Haha, I guess I was just being lazy.

So you have to instantiate a new DateTime object from the string that is put in the text box. Meaning you have to parse it.

Thanks again!

No comments:

Post a Comment