如何在laravel中将bootsrap 4和jquery 3.3.1与jquery ui一起使用?

时间:2018-08-01 20:57:32

标签: php jquery html laravel

我想显示一个日期选择器并设置格式“ dd-mm-yyyy”,但是我不能显示一个普通的日期选择器。有谁知道为什么jQuery ui无法正常工作?

控制台抛出:

jquery-ui.min.js:324 Uncaught TypeError: Cannot read property 'msie' of undefined
    at e._generateHTML (jquery-ui.min.js:324)
    at e._updateDatepicker (jquery-ui.min.js:290)
    at HTMLInputElement._showDatepicker (jquery-ui.min.js:288)
    at HTMLInputElement.dispatch (app.js:1)
    at HTMLInputElement.g.handle (app.js:1) 

这是我的html代码

$('.datepicker').datepicker({
         
        });
    <html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
    
        <!-- CSRF Token -->
        <meta name="csrf-token" content="{{ csrf_token() }}">
    
        <title>{{ config('app.name', 'Torus Trading') }}</title>
    
        <!-- Scripts -->
        <script src="{{ asset('js/app.js') }}" ></script>
        <script src="{{ asset('js/jquery-ui-1.12.1/jquery-ui.min.js') }}" >
        </script>
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
    
        <!-- Fonts -->
        <link rel="dns-prefetch" href="https://fonts.gstatic.com">
        <link href="https://fonts.googleapis.com/css?family=Raleway:300,400,600" rel="stylesheet" type="text/css">
    
        <!-- Styles -->
        <link href="{{ asset('css/app.css') }}" rel="stylesheet">
        <link href="{{ asset('css/custom.css') }}" rel="stylesheet">
    	    <link href="{{ asset('js/jquery-ui-1.12.1/jquery-ui.min.css') }}" rel="stylesheet">
    </head>
  <input type="text" class="datepicker">

0 个答案:

没有答案