Uncaught TypeError: $(...).daterangepicker is not a function(anonymous function)

xingxingdisnd xingxingdisnd 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
报错如下:
Uncaught TypeError: $(...).daterangepicker is not a function(anonymous function) @ summary.html:184
p.Callbacks.k @ jquery.min.js:2
p.Callbacks.l.fireWith @ jquery.min.js:2
p.extend.ready @ jquery.min.js:2
D @ jquery.min.js:2

代码如下:
<div class="condition" style="float:right;">

<form class="form-horizontal">
<fieldset>
<div class="control-group" style="margin-top:-5px;margin-right:-5px;">
<div class="controls" style="margin-left: 5px;">
<div class="input-prepend input-group">
<span class="add-on input-group-addon" style="height:30px;">
<i class="glyphicon glyphicon-calendar fa fa-calendar">
</i>
</span>
<input type="text" style="width: 170px;height:30px;cursor: pointer;" name="reservation" id="reservation" class="form-control" value="09/18/2015 - 09/22/2015" />
</div>
<button type="button" class="btn btn-info" style="height:30px;">导出</button>
</div>
</div>

</fieldset>
</form>
<script type="text/javascript" src="js/jquery.min.js">
</script>
<script type="text/javascript" src="js/bootstrap.min.js">
</script>
<script type="text/javascript" src="js/moment.js">
</script>
<script type="text/javascript" src="js/daterangepicker.js">
</script>
<script type="text/javascript">
$(document).ready(function() {
$('#reservation').daterangepicker(null,
function(start, end, label) {
console.log(start.toISOString(), end.toISOString(), label);
});
});
</script>

</div>
网页是用的bootstrap:perfectum_dashboard_1_0_4_html这个模板,现在加一个bootstrap是daterangepicker上去,可是一直报错js不起作用,求帮助
...全文

相关推荐

解决Ajax方式上传文件报错"Uncaught TypeError: Illegal invocation"

主要介绍了Ajax方式上传文件报错"Uncaught TypeError: Illegal invocation",非常不错,具有一定的参考借鉴价值,需要的朋友可以参考下

weixin_38732519

解决jquery插件:TypeError:$.browser is undefined报错的方法

为大家分享了一个解决jquery插件:TypeError:$.browser is undefined报错的方法,解决报错问题的方法也很简单,需要解决此类问题的朋友不要错过这篇文章。

weixin_38672940

解决浏览器报错:Uncaught TypeError[项目源码]

文章详细分析了浏览器控制台报错“Uncaught TypeError: Cannot read properties of undefined (reading ‘forEach’)”的原因及解决方法。该错误通常是由于调用forEach方法的对象为undefined或未定义。解决思路包括查看控制台报错指向的位置,检查并确保调用forEach的对象不为空。具体步骤包括在相关函数中打印调用forEach的对象,确认其是否为undefined,并通过解决fileList对象为空的问题来修复错误。

hp777

bootstrap+jquery项目引入文件报错的解决方法

主要介绍了bootstrap+jquery项目引入文件的常见报错问题,下面小编给大家带来了一些错误及错误的解决方法,需要的朋友可以参考下

weixin_38595243

我敢说在座的所有人都遇到过这些JS常见的错误【谨以此篇记录成长】

一、TypeError(类型错误) (1) TypeError:Uncaught TypeError: Cannot read property 'XXX' of undefined 调用了对象不存在的方法。 (2) TypeError:'undefined'is not an object 多半是使用了某个变量,拿到了一个尚未分配的变量,即undefind,然后用又undefined去做了一些事情。比如说:绑定到某些dom上面等… (3) TypeError: 'null' is not an object null 表示该值为空。这种错误可能发生场景是:在加载元素之前尝试在 JS中

weixin_38700320
评论 5
收藏 已收藏
分享
返回顶部
xingxingdisnd
非技术区 23,404 成员 70,506 内容