Uncaught TypeError: $(...).daterangepicker is not a function
本文为博主原创,未经允许不得转载:
在用bootstrap做一个日期插件的时候,代码和js,css等都是拷贝网上下载下来的实例,但是在
调试的时候,浏览器控制台一直报错 Uncaught TypeError: $(...).datetimepicker is not a function。
由于直接引用别人的代码,且别人的代码是可行的,为什么在我这边不行,上网搜了很多,且大多是
一些外文网站的,然后就在本地调试,查看引用js代码实现的方式,发现也没问题。最后调换了以下引用
的两个js的顺序就ok了,将代码展示如下:

就是上图中第二个和第三个的顺序放反了,然后就一直加载不出来,调换过来就ok了
js代码如下:
<script type="text/javascript">
$(document).ready(function() {
updateConfig();
function updateConfig() {
$('#datePickerSelect').daterangepicker({
"startDate": "12/01/2017",
"endDate": "12/07/2018"
}, function(start, end, label) {
console.log("New date range selected: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD') + ' (predefined range: ' + label + ')");
});
}
});
</script>
Uncaught TypeError: $(...).daterangepicker is not a function的更多相关文章
- 360浏览器Uncaught TypeError: object is not a function问题
刚刚360浏览器提示 Uncaught TypeError: object is not a function,找了半天发现问题是我有一个按钮,id和方法重复了,所以提示这个. <input t ...
- Uncaught TypeError: download is not a function at HTMLAnchorElement.onclick (index.html:25)
前段时间调试html报了这样的一个错误 Uncaught TypeError: download is not a function at HTMLAnchorElement.onclick ...
- “Uncaught TypeError: string is not a function”
http://www.cnblogs.com/haitao-fan/archive/2013/11/08/3414678.html 今天在js中写了一个方法叫做search(),然后点击按钮的时候提示 ...
- chrome浏览器Uncaught TypeError: object is not a function问题解决
今天测试多浏览器的时候,chrome浏览器出现Uncaught TypeError: object is not a function: 解决办法:(不知道为啥子)改一下js的方法名字就可以了
- Uncaught TypeError: undefined is not a function
index.html <script src="resources/sap-ui-core.js" id="sap-ui-bootstrap" data- ...
- Fatal error: Uncaught Error: Call to a member function bind_param() on boolean
1.2019年10月22日 PHP写mysqli 预编译查询的时候报错. Fatal error: Uncaught Error: Call to a member function bind_par ...
- js Uncaught TypeError: undefined is not a function
如下代码: var columns={}; var column={}: column.name='张三'; columns.push(column); 会出现Uncaught TypeError: ...
- Google Chrome Uncaught TypeError: object is not a function
<html> <script type="text/javascript"> function testForm(){ alert("hello ...
- Uncaught TypeError: $(…).orgcharts is not a function
调整js顺序没有解决,最后增加NoConflict解决,注意红色部分 function initorgcharts() { var $jq = jQuery.noConflict(true); org ...
随机推荐
- (1.3)mysql 事务控制和锁定语句
(1.3)mysql 事务控制和锁定语句 lock table 参考转载自:https://www.cnblogs.com/kerrycode/p/6991502.html 关键词:mysql loc ...
- SQL Server学习路径(文章目录)
SQL Server文章目录 SQL Server文章目录(学习路径) 转自:http://www.cnblogs.com/CareySon/archive/2012/05/08/2489748.h ...
- dedecms如何增加自定义字段
开源的cms比较好的一点是可以根据自己的需求来开发相应的功能,比如dedecms想要增加一个专家职称字段调用要怎么调用呢? 增加自定义字段:后台找到 “核心” - 频道模型 - 内容模型管理 - 字段 ...
- OC导航栏跳转指定界面
方法一: [self.navigationController popToViewController:[self.navigationController.viewControllers objec ...
- 下厨房6月26日数据丢失事故总结 MYSQL主分区被rm 命令误删除
下厨房6月26日数据丢失事故总结 MYSQL主分区被rm 命令误删除 http://tech.xiachufang.com/?p=18 在6月26日凌晨12点左右,我们在做线上数据库的备库时,误将线上 ...
- cube-ui的用法
.安装:npm install cube-ui -S .修改 .babelrc:(添加到plugins中去) { "plugins": [ ["transform-mod ...
- [vue]计算和侦听属性(computed&watch)
先看一下计算属性 vue只有data区的数据才具备响应式的功能. 计算和侦听属性 - v-text里可以写一些逻辑 <div id="example"> {{ mess ...
- PAT 1021 Deepest Root[并查集、dfs][难]
1021 Deepest Root (25)(25 分) A graph which is connected and acyclic can be considered a tree. The he ...
- [LeetCode] 261. Graph Valid Tree _ Medium tag: BFS
Given n nodes labeled from 0 to n-1 and a list of undirected edges (each edge is a pair of nodes), w ...
- Android下基于线程池的网络访问基础框架
引言 现在的Android开发很多都使用Volley.OkHttp.Retrofit等框架,这些框架固然有优秀的地方(以后会写代码学习分享),但是我们今天介绍一种基于Java线程池的网络访问框架. 实 ...