vuejs-datepicker icon indicating copy to clipboard operation
vuejs-datepicker copied to clipboard

Input tag wrapped by empty class div

Open mjako78 opened this issue 5 years ago • 3 comments

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 Screenshot_20190309_114927

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 Screenshot_Right

Am I doing something wrong?

I have done a sandbox here https://codesandbox.io/s/n4rz2nwok4

mjako78 avatar Mar 09 '19 10:03 mjako78

I made a pull-request for this #689

mjako78 avatar Mar 12 '19 11:03 mjako78

Hacked it and fixed with the following, until the related pull request is merged.

.vdp-datepicker>div:first-of-type {
    display:inline;
}

kurucu avatar Aug 25 '19 13:08 kurucu

I have same problem, help me please!

vankhanhpr avatar Apr 15 '20 15:04 vankhanhpr