简体   繁体   English

未定义的日期选择器不是函数

[英]date picker undefined is not a function

IM using the following code and I got error is the console undifinnd is not a function,what am I doing wrong here ? IM使用以下代码,但我收到错误消息,是控制台undifinnd不是函数,我在这里做错了什么?

<script src="~/Scripts/jquery-2.1.1.min.js"></script>
<script type="text/javascript">
$(function () {

$('#datetime').datepicker();
});
</script>

I've also try with and I got the same error... 我也尝试过,并且遇到相同的错误...

$('#datetime')..datetimepicker();

It looks like from the code you are only inlcuding the main jQuery library and not including the jQueryUI library for which that method is part of ( http://jqueryui.com/datepicker/ ). 从代码中看来,您仅包含主要的jQuery库,而没有包括该方法所属的jQueryUI库( http://jqueryui.com/datepicker/ )。 If you include the jqueryUI library after your jQuery script call you should stop getting errors. 如果在jQuery脚本调用之后包含jqueryUI库,则应该停止获取错误。

Datepicker is in JQuery UI . Datepicker在JQuery UI中 You must include that library as well. 您还必须包括该库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM