praveenpuglia / vuetify-daterange-picker

The missing date range picker for Vuetify JS you have been looking for.
https://vuetify-daterange-picker.gitbook.io/docs
MIT License
197 stars 59 forks source link

Error using vuetify components #39

Closed nachomozo closed 5 years ago

nachomozo commented 5 years ago

I have a project with vuetify. Vuetify is working well all across my project. But, when y try to use the date range piker (globally registered) it fails with the following errors:

vue.runtime.esm.js?2b0e:587 [Vue warn]: Unknown custom element: <v-list> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
found in
---> <VDaterange>
vue.runtime.esm.js?2b0e:587 [Vue warn]: Unknown custom element: <v-subheader> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
found in
---> <VDaterange>

Throws the same error with all vuetify components.

I have vuetify@1.3.9 installed with Vue CLI 3 and initialized like that:

// /src/plugins/vuetify.js

import Vue from 'vue'
import Vuetify from 'vuetify/lib'
import 'vuetify/src/stylus/app.styl'
import VDateRange from 'vuetify-daterange-picker';
import 'vuetify-daterange-picker/dist/vuetify-daterange-picker.css';

Vue.use(Vuetify, {
  iconfont: 'md',
})

Vue.use(VDateRange);

I realized that if i change import Vuetify from 'vuetify/lib' to import Vuetify from 'vuetify', everything seems to work fine but i don't know what impact it will have in vuetify.

praveenpuglia commented 5 years ago

Hi! It doesn't look like you are using À la carte mode with vuetify. So ideally, you should be doing

import Vuetify from 'vuetify'

instead of

import Vuetify from 'vuetify/lib'

As far as I can tell, nothing should break.