我正在尝试在网页上实现 Jquery 日期时间选择器,但不断收到以下错误:
未捕获的类型错误:无法读取未定义的属性“timepicker”
我从这里下载了 timepicker 插件:
http://trentrichardson.com/examples/timepicker/#basic_examples
http://trentrichardson.com/examples/timepicker/jquery-ui-timepicker-addon.js
这是生成错误的代码部分:
$.ui.timepicker = $.ui.timepicker || {};
if ($.ui.timepicker.version) {
return;
}
在我的网页上,我有以下内容:
<script type="text/javascript" src="/Scripts/jquery-lib/jquery-2.0.3.js"></script>
<script type="text/javascript" src="/Content/bootstrap/js/jquery-ui-timepicker-addon.js"></script>
<script type="text/javascript" src="/Content/bootstrap/js/jquery.ui.datepicker.js"></script>
<script type="text/javascript" src="/Content/bootstrap/js/jquery-ui-sliderAccess.js"></script>
和脚本:
<script>
$(function () {
$("#datetimepicker").datepicker();
});