Skip to content
This repository has been archived by the owner on May 25, 2018. It is now read-only.

Add prop 'label' for datepicker, just as inputs #373

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/Datepicker.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<template>
<div class="datepicker">
<slot name="label"><label v-if="label" class="control-label">{{label}}</label></slot>
<input class="form-control datepicker-input" :class="{'with-reset-button': clearButton}" type="text" :placeholder="placeholder"
:style="{width:width}"
@click="inputClick"
Expand Down Expand Up @@ -99,6 +100,10 @@ export default {
},
placeholder: {
type: String
},
label: {
type: String,
default: null
}
},
ready () {
Expand Down