Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] How do I set the name of the input field? #58

Open
Asuza opened this issue Feb 13, 2024 · 0 comments
Open

[Question] How do I set the name of the input field? #58

Asuza opened this issue Feb 13, 2024 · 0 comments

Comments

@Asuza
Copy link

Asuza commented Feb 13, 2024

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant