vuejs-datepicker
vuejs-datepicker copied to clipboard
Input tag wrapped by empty class div
The datepicker component add an empty-class div as wrapper, but the real wrapper sould be the parent div (the one with class="vdp-datepicker"). In this way when I add a wrapper-class prop to datepicker, that class is applied to the outermost div. In short, I define this datepicker
<datepicker :minimumView="'year'"
:format="'yyyy'"
:openDate="startingDate"
v-model="currentYear"
placeholder="Select year"
wrapper-class="ui action input">
<button slot="afterDateInput" class="ui button" @click="confirmYear">Confirm</button>
</datepicker>
I am using semantic-ui styling here and this is what I get
And this is the HTML generated
<div class="vdp-datepicker ui action input">
<div class=""><!-- Not needed tag!!-->
<input type="text" open-date="Sun Jan 01 1950 00:00:00 GMT+0100 (Ora standard dell’Europa centrale)" placeholder="Select year" readonly="readonly" autocomplete="off"> <!---->
<button class="ui button">Confirm</button>
</div> <!----> <!---->
</div>
If I manually remove the "Not needed tag!!", all is working
Am I doing something wrong?
I have done a sandbox here https://codesandbox.io/s/n4rz2nwok4
I made a pull-request for this #689
Hacked it and fixed with the following, until the related pull request is merged.
.vdp-datepicker>div:first-of-type {
display:inline;
}
I have same problem, help me please!