本文为博主原创,未经允许不得转载:

在用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的更多相关文章

  1. 360浏览器Uncaught TypeError: object is not a function问题

    刚刚360浏览器提示 Uncaught TypeError: object is not a function,找了半天发现问题是我有一个按钮,id和方法重复了,所以提示这个. <input t ...

  2. Uncaught TypeError: download is not a function at HTMLAnchorElement.onclick (index.html:25)

    前段时间调试html报了这样的一个错误 Uncaught TypeError: download is not a function     at HTMLAnchorElement.onclick ...

  3. “Uncaught TypeError: string is not a function”

    http://www.cnblogs.com/haitao-fan/archive/2013/11/08/3414678.html 今天在js中写了一个方法叫做search(),然后点击按钮的时候提示 ...

  4. chrome浏览器Uncaught TypeError: object is not a function问题解决

    今天测试多浏览器的时候,chrome浏览器出现Uncaught TypeError: object is not a function: 解决办法:(不知道为啥子)改一下js的方法名字就可以了

  5. Uncaught TypeError: undefined is not a function

    index.html <script src="resources/sap-ui-core.js" id="sap-ui-bootstrap" data- ...

  6. 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 ...

  7. js Uncaught TypeError: undefined is not a function

    如下代码: var columns={}; var column={}: column.name='张三'; columns.push(column); 会出现Uncaught TypeError: ...

  8. Google Chrome Uncaught TypeError: object is not a function

    <html> <script type="text/javascript"> function testForm(){ alert("hello ...

  9. Uncaught TypeError: $(…).orgcharts is not a function

    调整js顺序没有解决,最后增加NoConflict解决,注意红色部分 function initorgcharts() { var $jq = jQuery.noConflict(true); org ...

随机推荐

  1. BUG笔记:Android原生浏览器不认负百分数margin致Foundation Orbit往右滑动动画出错

    一看这标题就知道无比蛋疼了是不?至少我从来不用安卓自带的浏览器... 发现这个bug的场景:万恶的Foundation,它的滚动图片插件Orbit在安卓自带浏览器下手指从左往右滑动时动画仍旧表现为从右 ...

  2. 创建list方法总结

    版权声明:本文为博主原创文章,未经博主同意不得转载. https://blog.csdn.net/sheismylife/article/details/28878593 构建一个list 注意要标记 ...

  3. 最简单的css实现页面宽度自适应

    <div class="rxs"> <div class="rxleft"> 第一段内容,可以是任何html标签 </div> ...

  4. [django]JsonResponse序列化数据

    def home(request): data = { 'name': 'maotai', 'age': 22 } import json return HttpResponse(json.dumps ...

  5. linux命令:locate

    1.命令简介         locate(locate) 命令用来查找文件或目录. locate命令要比find -name快得多,原因在于它不搜索具体目录,而是搜索一个数据库/var/lib/ml ...

  6. (转)Elasticsearch 的坑爹事——记录一次mapping field修改过程

    Elasticsearch 的坑爹事 本文记录一次Elasticsearch mapping field修改过程 团队使用Elasticsearch做日志的分类检索分析服务,使用了类似如下的_mapp ...

  7. 安卓手机上微信无法打开Https网址的完美解决方案

    1,第三方网站检测网站的SSL证书是否正确的安装 https://www.geocerts.com/ssl-checker,大概率你会看到下边的场景,一个证书链完整的警告,如果想知道我的基础配置是什么 ...

  8. SQL CASE 多条件用法

    Case具有两种格式.简单Case函数和Case搜索函数. --简单Case函数 CASE sex          WHEN '1' THEN '男'          WHEN '2' THEN ...

  9. 企业中如何批量更改mysql中表的存储引擎?

    一.首先必须熟悉Mysql中有哪些基本的数据库,在mysql中database等价于schema,默认的基本库有四个:mysql,information_schema,performance_sche ...

  10. python+Django框架运用(一)

    Django 介绍: django是一个采用Python语言开发的开源框架,2005年发布.早期是做新闻以及内容管理的网站的,提供了非常强大的后管理系统. django官网:https://www.d ...