datepickerrange无法正常工作我从网站链接复制如下

时间:2017-11-02 07:08:14

标签: javascript html5 momentjs daterangepicker

此代码正在网站上运行但在我的localhost上不知道在这里搜索帮助!请帮帮我

k k my library screenshot please have a look dont know which one is clashing

工作链接http://tamble.github.io/jquery-ui-daterangepicker/

    
        $(function() { $("#e1").daterangepicker(); });
    
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.min.js"></script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-date-range-picker/0.14.4/jquery.daterangepicker.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-date-range-picker/0.14.4/daterangepicker.min.css">
<body>
    <input id="e1" name="e1">
</body>

1 个答案:

答案 0 :(得分:1)

修改库的版本:

  • daterangepicker - 0.5.0
  • momentjs - 2.3.0 +

检查代码中的依赖项: enter image description here

演示:http://jsfiddle.net/lotusgodkk/GCu2D/2213/

   $(document).ready(function() {
        $("#e1").daterangepicker({});
    });