jquery datepicker 不工作。我不知道为什么。每个人都在做同样的事情,同样的代码,但我的不工作。谁能告诉我的问题在哪里,我的代码如下 -
Javascript:
<link href="@Url.Content("~/Content/themes/base/jquery.ui.datepicker.css")" rel="stylesheet" type="text/css" />
<script src="@Url.Content("~/Scripts/jquery-1.5.1.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery-ui-1.8.11.min.js")" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
$(function () {
$('#dtpStartDate').datepicker({ dateFormat: "dd/MM/yy" });
});
</script>
html 视图中的代码:
<div class="row">
<div class="span3">
<div class="text-left">
@Html.LabelFor(model => model.StartDate)
</div>
</div>
<div class="span3">
<div class="text-left">
@Html.TextBoxFor(model => model.StartDate, new { @id = "dtpStartDate" })
@Html.ValidationMessageFor(model => model.StartDate)
</div>
</div>
</div>