我想日期選擇器的窗口小部件我的視圖在ASP.net mvc project.here我創建了一個Java腳本,如下所述,但我無法獲得日期當我運行應用程序時選擇器。請幫助我。如何在日期選擇器中添加javascript的ASP.Net MVC 4
Java腳本使用
$(document).ready(
function() {$("#datepicker").mdatepicker({
changeMonth: true,
changeYear: true }); }
HTML代碼視圖:
<head>
<script type="text/javascript" src="@Url.Content("~/Scripts/jquery-1.8.2.js")">
</script>
<script type="text/javascript" src="@Url.Content("~/Scripts/jquery-ui-1.8.24.js")"></script>
<script type="text/javascript" src="@Url.Content("~/Scripts/JavaScriptdatpickr.js")"></script>
<div class="editor-label" name="datepicker" id="datepicker">
@Html.LabelFor(model => model.Registereddate)
</div>
<div class="editor-field" name="datepicker" id="datepicker">
@Html.EditorFor(model => model.Registereddate)
@Html.ValidationMessageFor(model => model.Registereddate)
</div>
我都嘗試您的建議,但它不sadly.Kindly工作 - :上
#Registereddate
應用如圖所示進一步幫助我的頁面中有日期選擇器。 – 2014-09-06 12:02:33@ramki_ramakrishnan ...任何控制檯錯誤? – 2014-09-06 12:03:07
@ramki_ramakrishnan ...只需更改@ Html.EditorFor(model => model.Registereddate)與@ Html.TextBoxFor(model => model.Registereddate)並嘗試.. – 2014-09-06 12:07:10