hidden
hidden

Reputation: 41

vuejs-datepicker not show

I need some help. The input box doesn't seem to be appearing. I am not using app.js as it gives me problem with Buefy. Anything I did wrongly? Thanks.

<!doctype html>
<html lang="{{ app()->getLocale() }}">
<head>
    <!-- Fonts -->
    <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" type="text/css">
     <link href="{{ asset('css/app.css') }}" rel="stylesheet">
      <script src="{{ asset('js/vue2.4.2.js') }}"></script>
      <script src="{{ asset('js/buefy0.4.6.js') }}"></script>
      <script src="{{ asset('js/axios.min.js') }}"></script>
</head>
<body>
  <div id="app">
      <hr>
  <div class="container">
      <datepicker name="test" placeholder="European Format ('d-m-Y')" :config="{ dateFormat: 'd-m-Y', static: true }"></datepicker>
  </div>
</div>
    <script type="text/javascript">
        Vue.use(Buefy.default)
        var app = new Vue({
          el: '#app',
          components: {
          'datepicker': DatePicker
          },
          data: {
            name:'test'
          },
          methods: {
            }
        });
    </script>
</body>
</html>

Upvotes: 0

Views: 2811

Answers (2)

hidden
hidden

Reputation: 41

In the app.js file

import Buefy from 'buefy';
Vue.use(Buefy);

Do not use

Vue.use(Buefy.Default);

Upvotes: 1

Ikbel
Ikbel

Reputation: 7851

I think it should be:

components: {
  'datepicker': Buefy.Datepicker
}

Upvotes: 1

Related Questions