vue-datepicker-next
vue-datepicker-next copied to clipboard
[Question] How do I set the name of the input field?
Vue-datepicker-next version: 1.0.3 Vue version: 3.4.15 Browser: Firefox
I'm trying to understand how to set the name value, but I can't get it to work. I'm using the DatePicker
in another component, and have it set up like so:
<DatePicker
v-bind="$attrs"
ref="input"
:format="format"
:type="type"
name="this_is_a_test"
:value="value"
@input="onInput"
@change="handleChange"
@blur="handleBlur"
>
But when I inspect the DOM, it ends up like:
<input name="date" type="text" autocomplete="off" class="required form-control" readonly="">
I also tried some other ways to set it after skimming the source code but nothing changed the name. Please let me know how to do that. I couldn't find any examples in the documentation. Thanks!