I am using jqueryUI date-picker for inputting the ReceivedByDate. But my ng-model for retrieving date value is always passing null value. I am working with asp.net mvc 4 with angularJs. Here is my code:
@Html.TextBoxFor(model => model.ReceivedByDate, new { autocomplete = "off", ng_model = "requisition.ReceivedByDate" })
<p>{{requisition.ReceivedByDate}}</p>
My script for datepicek is like this:
$(function () {
$("#ReceivedByDate").datepicker({
changeMonth: true,
changeYear: true
});
$("#ReceivedByDate").datepicker("option", "dateFormat", "yy-mm-dd");
});
Although when I select a date but the value inside the "< p> < /p>" remains null. It seems always holding null. What wrong am I doing?