Closed Rolanddoda closed 5 years ago
You need to install it as a plugin. Did you do that? If you do, you won't have to import it in component like so.
https://github.com/praveenpuglia/vuetify-daterange-picker#usage
I followed the instructions to import it only in one component. I don't want to install it globally with Vue.use()
I was able to import component locally with:
export default {
components: { 'v-daterange': VDateRange },
but I am getting errors: Unknown custom element:
I have VUE CLI 3 project with TypeScript and Vuetify plugin installed.
@praveenpuglia Looks like you're only exporting the default (and not the DateRange
component) from https://github.com/praveenpuglia/vuetify-daterange-picker/blob/master/src/index.js ?
Ah! Thanks a ton @lbogdan. Sorry, I didn't have the time to look into it so far because of busy day job. Would you like to send a PR ? I am more than happy to merge one. :)
Fixed in v2.6.2 - https://github.com/praveenpuglia/vuetify-daterange-picker/releases/tag/v2.6.2
The readme is also updated with the import syntax.
// If you want to use in one of your components.
import { DateRange } from 'vuetify-daterange-picker';
import 'vuetify-daterange-picker/dist/vuetify-daterange-picker.css';
export default {
components: { [DateRange.name]: DateRange },
...
};
I imported these:
And this on components section:
Obviously this won't work