Welcome Guest Search | Active Topics | Sign In | Register

DatePicker control and Posting Form Options
Bob
Posted: Tuesday, December 22, 2009 1:57:36 PM
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.
Code: HTML/ASPX
eo_support
Posted: Tuesday, December 22, 2009 1:59:41 PM
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!
Bob
Posted: Tuesday, December 22, 2009 2:38:25 PM
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 ?
eo_support
Posted: Tuesday, December 22, 2009 2:51:59 PM
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


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.