Jquery 引导datetimepicker类型错误:$(…)。datetimepicker不是函数
嗨,我在尝试将引导datetimepicker应用于输入时遇到以下错误 我已经检查了源代码,没有两次引用任何JS库 我也尝试过在没有任何运气的情况下改变我推荐信的顺序 有人知道我可能做错了什么吗 我正在使用: 错误: 未捕获类型错误:$(…)。datetimepicker不是函数 my_layout.chtml的开始:Jquery 引导datetimepicker类型错误:$(…)。datetimepicker不是函数,jquery,html,twitter-bootstrap,Jquery,Html,Twitter Bootstrap,嗨,我在尝试将引导datetimepicker应用于输入时遇到以下错误 我已经检查了源代码,没有两次引用任何JS库 我也尝试过在没有任何运气的情况下改变我推荐信的顺序 有人知道我可能做错了什么吗 我正在使用: 错误: 未捕获类型错误:$(…)。datetimepicker不是函数 my_layout.chtml的开始: <script type="text/javascript" src="/Scripts/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="/Scripts/jquery-1.10.2.min.js"></script>
<script src="http://code.jquery.com/ui/1.10.2/jquery-ui.js"></script>
<script type="text/javascript" src="/Scripts/moment.min.js"></script>
<script type="text/javascript" src="/Scripts/bootstrap.min.js"></script>
<script type="text/javascript" src="/Scripts/bootstrap-datetimepicker.min.js"></script>
<link rel="stylesheet" href="/Content/bootstrap.min.css" />
<link rel="stylesheet" href="/Content/bootstrap-datetimepicker.min.css" />
my edit.chtml的正文
<div class="form-group">
@Html.LabelFor(model => model.DateOfBirthDateTime, htmlAttributes: new { @class = "date-picker-standard control-label col-md-2" })
<div class="col-md-10">
@Html.EditorFor(model => model.DateOfBirthDateTime, new { htmlAttributes = new { @class = "form-control" } })
@Html.ValidationMessageFor(model => model.DateOfBirthDateTime, "", new { @class = "text-danger" })
</div>
</div>
<script type="text/javascript">
$(function () {
$(document).ready(function () {
$('.date-picker-standard').datetimepicker();
});
});
</script>
@LabelFor(model=>model.DateOfBirthDateTime,htmlAttributes:new{@class=“date picker标准控件标签col-md-2”})
@EditorFor(model=>model.DateOfBirthDateTime,new{htmlAttributes=new{@class=“form control”})
@Html.ValidationMessageFor(model=>model.DateOfBirthDateTime,”,新的{@class=“text danger”})
my edit.chtml的底部
<div class="form-group">
@Html.LabelFor(model => model.DateOfBirthDateTime, htmlAttributes: new { @class = "date-picker-standard control-label col-md-2" })
<div class="col-md-10">
@Html.EditorFor(model => model.DateOfBirthDateTime, new { htmlAttributes = new { @class = "form-control" } })
@Html.ValidationMessageFor(model => model.DateOfBirthDateTime, "", new { @class = "text-danger" })
</div>
</div>
<script type="text/javascript">
$(function () {
$(document).ready(function () {
$('.date-picker-standard').datetimepicker();
});
});
</script>
$(函数(){
$(文档).ready(函数(){
$('.date picker standard').datetimepicker();
});
});
问题已解决:
它隐藏在我的_layout.chtml的底部
@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/bootstrap")