phoenixwong / vue2-timepicker

A dropdown time picker (hour|minute|second) for Vue 2.x, with flexible time format support
https://phoenixwong.github.io/vue2-timepicker/
MIT License
432 stars 193 forks source link

Feature Request: Should be able to use it as a directive. #128

Closed rajeshwarpatlolla closed 4 years ago

rajeshwarpatlolla commented 4 years ago

If we can use it as a directive on any element that would be really great. For example i am using vuetify along with vue.js. In my form all form input elements has some king of stylings provided by vuetify. But when i use this vue2-timepicker i am loosing all the css and floating labels.

Before entering input values

Screenshot 2020-08-14 at 10 47 42 PM

After entering input values

Screenshot 2020-08-14 at 10 47 32 PM

In the above image i don't know to which label the time belongs to as the floating lable is missing.

I managed to add some css to look like the same vuetify form input element, but the floating label is not working as expected.

phoenixwong commented 4 years ago

If we can use it as a directive on any element that would be really great.

By referring "directive", If what you meant was the Vue custom directive, the answer is "Nope". This repository is not built for that in the first place. We welcome any potential contributors to fork and help.

Besides, from the screenshot you provided, it seems more like a CSS issue, and/or value reactive issue. Changing VueTimepicker to a directive is not going to resolve the problem.

It would great if you can provide a live demo similar to the case you made in the screenshot. Here's a demo base with the latest Vue Timepicker in JSFiddle. Please feel free to fork it as a scaffold.

phoenixwong commented 4 years ago

I am closing this for lacking information. Please feel free to reopen it with a demo, with which we can do further investigation.