vue-datetime
vue-datetime copied to clipboard
Slot events do not work
Clicking a slot e.g. icon in input does not open calender
<datetime
v-model="search_from"
input-id="from"
type="date"
placeholder="From"
>
<span class="vDateTime-picker__icon" slot="after"></span>
</datetime>
Workaround using global ref and manual event handler :
<datetime
ref="search_from"
v-model="search_from"
input-id="from"
type="date"
placeholder="From"
<span slot="before"
class="vDateTime-picker__icon"
@click="open_calender($event,'search_from')" ></span>
</datetime>
methods:{
open_calender:function(event,which){
this.$refs[which].open(event);
},