So I am using a component framework for Vue2 named vuetify and I am having a problem regarding the class of the input textbox.
So in the textbox component, the code is:
<template lang="pug">
div(
class="input-group"
v-bind:class="classes"
)
label(
v-bind:for="id"
v-html="label"
)
input(
v-bind:id="id"
v-bind:name="name"
v-bind:placeholder="placeholder"
v-bind:required="required"
v-bind:type="type"
v-bind:value="inputValue"
ref="input"
)
</template>
Now I want to add a class in the text input because I want it to be a date and I am using the flatpickr plugin. The name of the class is flatpickr. So the way I use the component is like this:
<v-text-input id="someID" label="SomeLabel" v-model="someModel"></v-text-input>
And if I try to add the class random I do it like this:
<v-text-input id="someID" label="SomeLabel" v-model="someModel" class="flatpickr"></v-text-input>
The code isn't working because the class goes to the div. I checked the code generated in the elements of chrome and it looks like this:
<div class="input-group flatpickr" data-v-3eb87e8e="">
<label for="SomeLabel">SomeLabel</label>
<input id="someID" type="text">
</div>
As you can see, the class goes to the class of the div. What's the best way/trick to add a class in the text input? Any help would be much appreciated.