vue-datetime icon indicating copy to clipboard operation
vue-datetime copied to clipboard

Slot events do not work

Open tomchiverton opened this issue 5 years ago • 1 comments

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>

tomchiverton avatar Feb 27 '19 12:02 tomchiverton

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);
		},

tomchiverton avatar Feb 27 '19 12:02 tomchiverton