我正在使用jqueryUI日期选择器来输入ReceivedByDate。但我检索日期值的ng-model总是传递空值。我正在使用带有angularJs的asp.net mvc 4。这是我的代码:
@Html.TextBoxFor(model => model.ReceivedByDate, new { autocomplete = "off", ng_model = "requisition.ReceivedByDate" })
<p>{{requisition.ReceivedByDate}}</p>
我的datepicek脚本是这样的:
$(function () {
$("#ReceivedByDate").datepicker({
changeMonth: true,
changeYear: true
});
$("#ReceivedByDate").datepicker("option", "dateFormat", "yy-mm-dd");
});
虽然我选择日期但“&lt; p&gt;&lt; / p&gt;”中的值仍然为空。似乎总是持有空。我做错了什么?