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

Binding to "Nested" Model property

My MVC model has some child classes:


  public class WorkOrderModel
    {
          public DateTime? End_Dt{ get; set; }
          public TimeLogDTO New_Time_Log { get; set; }
    }


If I try to bind SF's MVC controls to a property on the "root" level it works:

         @Html.EJS().DateTimePickerFor(m => m.End_Dt).Render()
                                               

However, if I try to bind it to a child class property, it just doesn;t bind anything on submit.

         @Html.EJS().DateTimePickerFor(m => m.New_Time_Log.End_Dt).Render()


This same sample works with regular MVC controls.

What am I missing?

3 Replies

DL Deepa Loganathan Syncfusion Team December 21, 2018 09:47 AM UTC

Hi Juan,  
 
Sorry for the inconvenience caused.  
 
We have checked the issue reported while posting Datepicker value with child classes and is reproducible in the version 16.3.0.21. However, we have already considered and fixed this in our latest version (16.4.0.42).  
 
So, we kindly request you upgrade to the latest version to get rid of this issue.  
 
Please get back to if you have any further queries. 
 
Regards,  
Deepa L. 



JJ Juan Jiminez December 21, 2018 08:13 PM UTC

Thanks, that works.


CI Christopher Issac Sunder K Syncfusion Team December 24, 2018 05:23 AM UTC

Hi Juan,  
  
We are glad to hear that the issue has been resolved. Please let us know if you need any further assistance. 
  
Thanks,
Christo 


Loader.
Live Chat Icon For mobile
Up arrow icon