Rank: Newbie Groups: Member
Joined: 12/22/2009 Posts: 2
|
Hi, How do you capture the value of the date selected from the DatePicker control after the form has been POSTED. The control textbox is not recognised as a posted field.
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
You get and set the DatePicker's Value through its SelectedDate property. You don't have to deal with form variables at all.
Thanks!
|
Rank: Newbie Groups: Member
Joined: 12/22/2009 Posts: 2
|
Thanks for your reply. Is it possible to get the DatePicker's value thru a posted form though, rather than using Javascript on the client side ?
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
Yes. It is possible. The name of the form variable is "_eo_DatePickerID_picker". You will need to replace "DatePickerID" with the ClientID (this is not the always the same as ID) of your DatePicker control. For example, if the ClientID of your DatePicker control is "DatePicker1", then the form variable name is "_eo_DatePicker1_picker".
Having that said, please keep in mind that you almost NEVER NEVER need to access that form variable directly. So unless you are quite clear about what you are doing, you should access the DatePicker's value through "normal" ways. The two "normal" ways to access DatePicker's values are:
1. Through SelectedDate property from code behind (C#, VB, etc). This is for server side code; 2. Through our client side JavaScript interface. This is for client side code;
Method #1 is usually sufficient for most users.
Hope this helps.
Thanks
|