Haixing-Hu / vue-datetime-picker

A Vue.js component implementing the datetime picker control using the Eonasdan's bootstrap datetime picker plugin.
http://haixing-hu.github.io/vue-datetime-picker/
MIT License
341 stars 77 forks source link

Attributes "class", "name", ":model.sync" are ignored on component <vue-datetime-picker> because the component is a fragment instance: #11

Closed nacr closed 7 years ago

nacr commented 8 years ago

I need help,

Cant use plugin because I'm getting this error.

´ Attributes "class", "name", ":model.sync" are ignored on component because the component is a fragment instance: ´

peshkov3 commented 8 years ago

Have the same issue

nacr commented 8 years ago

No support here?

yuyang041060120 commented 8 years ago

same issue

felorhik commented 8 years ago

This is not a full solution but should help, there is more issues that come up with this but enough to diagnose / fix.

Basically at least on my end this issue is due to it using the packed version, because it assumes your using webpack instead of browserify, so you need it imported based on the source instead.

so node_modules/vue-datetime-picker/src/vue-datetime-picker.js is the path you might need to use, depending on your setup that may change though.

This will get rid of the fragment instance issue but you will need to make sure the dependencies are properly available as well though. I am having some issues there so I cannot make any recommendation but I think I can handle getting through it with time, might post more once I do.

nacr commented 8 years ago

@Haixing-Hu we need help here to resolve this.

nacr commented 8 years ago

@ReactionJordan so for what I understand there is no browserify support for the package?

EHackettTriCore commented 7 years ago

+1 Browserify Support

nacr commented 7 years ago

+1 Browserify Support

geraldbiggs commented 7 years ago

@ReactionJordan Importing the source resolved for me as well. Using webpack.

Haixing-Hu commented 7 years ago

It seems that all the Vue plugins I have wrote have the same issue 😂 I'm not familiar with Browserify. Could anyone help me to work out the problem?

felorhik commented 7 years ago

Not exactly sure on the best practice for it. All I see is that browserify tends to work better with source and webpack likes to use precompiled. It is a trend I see in many other packages as well.

Although that being said some packages do still work for both, not sure what the creators did but clearly there is something that can simplify the process of making them compatible. I am only using an outsiders view as well so my input might not be entirely correct.

Anyway when I get time I am willing to give it a solid look.

balping commented 7 years ago

I'm using webpack and it doesn't work in the way described in the docs. However @ReactionJordan 's answer did solve the problem. It looks ugly, but works at least