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

在用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. android加载gif图片

    Android加载GIF图片的两种方式 方式一:使用第三开源框架直接在布局文件中加载gif 1.在工程的build.gradle中添加如下 buildscript { repositories { m ...

  2. 2F+1模式才是高可用 途牛旅游网 还是通过proxy层

    2F+1模式才是高可用 途牛旅游网 还是通过proxy层 f f f f f f f f f

  3. 怎样解决VMware虚拟机无法连接外网问题

    安装上虚拟机之后,再安装上linux之后,有时会出现ping不通物理机的ip和任何外网包括网关的ip的问题.虚拟机的网卡是桥接状态.下面就让我为大家演示下一下,怎么让虚拟机重新ping通物理机. 工具 ...

  4. 使用Navicat导入excel表

    1:首先创建Navicat与数据库的连接 2:,从数据库中选择要导入的表 3:导入向导,选择要导入的数据类型 4:创创建excel表:一般第一行需要与表的属性相对应,这样就不需要手动设置对应栏位 不一 ...

  5. logstash采集tomcat日志、mysql错误日志

    input{ file { path => "/opt/Tomcat7.0.28/logs/*.txt" start_position => "beginni ...

  6. python2.7 环境配置

    1.安装python2.7.8之后,配置环境变量:在path中配置python的安装路径 在cmd框中执行python,进入到python命令执行,即为配置成功. 2.执行过程中,提示缺少xlutil ...

  7. [LeetCode] 415. Add Strings_Easy tag: String

    Given two non-negative integers num1 and num2 represented as string, return the sum of num1 and num2 ...

  8. jmeter 基础功能详解

    jmeter 基础功能详解 thread group:包含一组线程,每个线程独立地执行测试计划. sampler:采样器,有多种不同的sample实现,用来发起各种请求,如http请求,jdbc请求, ...

  9. web api 获取传过来的Json

    public async void PostOrder(HttpRequestMessage request) { String responseBodyAsText = await request. ...

  10. sublime text3搭建react native

    Sublime Text 3 搭建React.js开发环境 Sublime有很强的自定义功能,插件库很庞大,针对新语言插件更新很快,配合使用可以快速搭建适配语言的开发环境. 1. babel-subl ...