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

Datepicker input name attribute

Open Stetzon opened this issue 8 years ago • 4 comments

Hi, would it be possible to add a name attribute to the Datepicker input element? This attribute is already present on the other input components (checkbox, radio, input, etc). Having trouble POSTing form data from the datepicker without it.

<input class="form-control datepicker-input" type="text" v-model="val" :class="{'with-reset-button': clearButton}" :placeholder="placeholder" :name="name" <!-- NEW --> :style="{width:width}" @click="inputClick" />

Stetzon avatar Mar 06 '17 19:03 Stetzon

#66 Submitted pull request

Stetzon avatar Mar 07 '17 15:03 Stetzon

If I import the component like this:

import { datepicker } from 'vue-strap'

It puts the name attribute on the parent div.

jeitnier avatar May 07 '17 19:05 jeitnier

@jeitnier Yes. Your right. But I am confused. Because I checkd the Datepicker.vue. I found the name attribute on the input...

leocxy avatar Jun 07 '17 07:06 leocxy

@Stetzon Hello Stetzon, I got the same issues with you. You can copy DatePicker.vue from vue-strap. and utils/utils.js -> translations function to somewhere. Then import it.

leocxy avatar Jun 07 '17 08:06 leocxy