我在 ASP.net MVC datepicker
中使用 bootstrap form
,但无法查看日历。
我正在使用 asp.net 捆绑包,我的页面源代码如下:
head
元素的渲染方式如下:
<title>Site login</title>
<link href="/Scripts/LyncPresence/styles/main.css" rel="stylesheet"/>
<link href="/Content/bootstrap.css" rel="stylesheet"/>
<link href="/Content/bootstrap-datetimepicker.css" rel="stylesheet"/>
<link href="/Content/bootstrap-datepicker.css" rel="stylesheet"/>
<link href="/Content/selectize.bootstrap3.css" rel="stylesheet"/>
<link href="/Content/Gridmvc.css" rel="stylesheet"/>
<link href="/Content/gridmvc.datepicker.css" rel="stylesheet"/>
<link href="/Content/font-awesome.css" rel="stylesheet"/>
<link href="/Content/metisMenu.css" rel="stylesheet"/>
<link href="/Content/sb-admin-2.css" rel="stylesheet"/>
<link href="/Content/site.css" rel="stylesheet"/>
<script src="/Scripts/modernizr-2.6.2.js"></script>
//and scripts are
<script src="/Scripts/jquery-3.1.1.js"></script>
<script src="/Scripts/jquery.unobtrusive-ajax.js"></script>
<script src="/Scripts/moment.js"></script>
<script src="/Scripts/bootstrap.js"></script>
<script src="/Scripts/bootstrap-datetimepicker.js"></script>
<script src="/Scripts/bootstrap-datepicker.js"></script>
<script src="/Scripts/bootbox.js"></script>
<script src="/Scripts/selectize.js"></script>
<script src="/Scripts/jquery-ui-touch-punch.js"></script>
<script src="/Scripts/jquery.validate.js"></script>
<script src="/Scripts/jquery.validate.unobtrusive.js"></script>
<script src="/Scripts/mvcfoolproof.unobtrusive.js"></script>
在 javascript 中,我初始化datetime
文本框,如:
$('#fieldName').datetimepicker({ format: 'dd MM yyyy - hh:ii' });
我无法看到日历,我错过了什么吗?我认为 JS 和 CSS 的顺序正确。