We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

what is datetimepicker value on a form post?

For the control:

<ej:DateTimePicker ID="txtArrive" TimePopupWidth="150" TimeDisplayFormat="h:mm tt" Width="280px" DateTimeFormat="MM/dd/yyyy h:mm tt" Interval="5" runat="server"></ej:DateTimePicker>

How do I get the value in the code behind.

txtArrive.value does not work.

1 Reply

PK Prem Kumar Madhan Raj Syncfusion Team January 2, 2017 12:49 PM UTC

Hi Thomas Moore, 

Thanks for using Syncfusion products, 
We have analyzed your sample. To get the value from control, using ID, we can use the code as like in below code example. Here the Value property need to be represent with proper casing(Value) since it’s a case sensitive one. 

So, to get the value of control in code behind, please use txtArrive.Value as like in below code example. 
<ej:DateTimePicker ID="txtArrive" TimePopupWidth="150" TimeDisplayFormat="h:mm tt" Width="280px"DateTimeFormat="MM/dd/yyyy h:mm tt" Interval="5" runat="server"></ej:DateTimePicker> 
  protected void Page_Load(object sender, EventArgs e) 
        DateTime? str = txtArrive.Value; 
Please let us know if you have further queries, 

Prem Kumar Madhan Raj. 

Live Chat Icon For mobile
Up arrow icon