vue3-datepicker
vue3-datepicker copied to clipboard
Submit with enter-press is not working if datepicker is inside form tag
Hi icehaunter,
great work on this component! However, I noticed an issue with this component. If it is being placed inside a form, it is not possible anymore to submit the form with a press of enter.
<form v-on:submit.prevent="save">
<datepicker v-model="foo"/>
<input type="text" v-model="bar">
<button type="submit">Speichern</button>
</form>
This form can only be submitted by pressing the button. However, if I move the datepicker component above the opening form tag, I can submit the form if the text input is focused and I press enter.
Hello! I'm not sure how you want this to be handled, given that the input is readonly by default, and clicking enter just closes the picker. Would you like a onEnter event to listen to?