I am using Jquery ui datepicker, the dateFormat is set to dd/mm/yyyy
.
My Local machine Server date format is set to mm/dd/yyyy
. So i converted the format in View.
<input type="text" class="form-control datepicker" value="@string.Format("{0:dd/MM/yyyy}", DateTime.Now)" name="LoanDate" required />
In my model on POST, I get LoanDate
as null
.
If I reset My Local machine date format to dd/mm/yyyy
, I get the LoanDate
in my Controller POST method.
How to solve this Issue?