ankurk91 / vue-flatpickr-component

Vue.js component for Flatpickr datetime picker :calendar:
https://ankurk91.github.io/vue-flatpickr-component/
MIT License
965 stars 102 forks source link

Unknown html tag flat-pickr #260

Closed bcorcoran closed 2 years ago

bcorcoran commented 2 years ago

Using vue-flatpickr-component ^9.0.6 and Vue 3

I am importing as such:

import flatPickr from 'vue-flatpickr-component'

and using it in my <template> as such:

<flat-pickr v-model="x" name="y" ... />

My editor is PHPStorm (but I'm sure this would occur in Webstorm or any other Jetbrains IDEs as well) -- it complains that:

"Unknown html tag flat-pickr"

This is the only package I've got that has this issue which makes me wonder if there's something about the way it has been exported? Most packages seem to require the import { something } from 'somewhere' format.

FWIW, the package works fine, but the IDE just can't tell that it's a component.

ankurk91 commented 2 years ago

Please follow the documentation Readme.

Looks like you did not register the component

bcorcoran commented 2 years ago

Tried that, same issue. IDE does not recognize it as a component so it thinks it's an invalid html tag.

I also tried app.component('flat-pickr', VueFlatPickr) and same result- IDE does not recognize it.

ankurk91 commented 2 years ago

I can not teach you vue j's on Github.