Skip to content

Commit

Permalink
Merge pull request #66 from Stetzon/datepicker
Browse files Browse the repository at this point in the history
Added name attribute to datepicker
  • Loading branch information
wffranco committed Mar 24, 2017
2 parents a3313b4 + b65c4ee commit 02b471c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 7 additions & 1 deletion docs/example/datepickerDocs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<p>
<pre>Selected date is: {{dateString}}</pre>
</p>
<datepicker ref="dp" v-model="date" :disabled-days-of-week="disabled" :format="format" :clear-button="clear" :placeholder="placeholder" width="370px"></datepicker>
<datepicker ref="dp" v-model="date" :name="name" :disabled-days-of-week="disabled" :format="format" :clear-button="clear" :placeholder="placeholder" width="370px"></datepicker>
<h4>Disabled days of week</h4>

<v-select multiple v-model="disabled" :options="[0,1,2,3,4,5,6]"></v-select>
Expand Down Expand Up @@ -39,6 +39,12 @@
<p><code>MMMM/dd/yyyy</code></p>
<p>The date format, combination of d, dd, M, MM, MMM, MMMM, yyyy.</p>
</div>
<div>
<p>name</p>
<p><code>String</code></p>
<p></p>
<p>Name to put on the input field</p>
</div>
<div>
<p>placeholder</p>
<p><code>String</code></p>
Expand Down
2 changes: 2 additions & 0 deletions src/Datepicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<input class="form-control datepicker-input" type="text"
v-model="val"
:class="{'with-reset-button': clearButton}"
:name="name"
:placeholder="placeholder"
:style="{width:width}"
@click="inputClick"
Expand Down Expand Up @@ -82,6 +83,7 @@ export default {
width: {type: String},
clearButton: {type: Boolean, default: false},
lang: {type: String, default: navigator.language},
name: {type: String},
placeholder: {type: String},
iconsFont: {type: String, default: 'glyphicon'}
},
Expand Down

0 comments on commit 02b471c

Please sign in to comment.