Skip to content

Commit

Permalink
Enable v-model to the datepicker.
Browse files Browse the repository at this point in the history
  • Loading branch information
starkhorn authored Nov 28, 2016
1 parent 7d39a87 commit a0d2e53
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<component :is="wrap ? 'WrapperInput' : 'SingleInput'">
<component :is="wrap ? 'WrapperInput' : 'SingleInput'" :value="value">
<slot></slot>
</component>
</template>
Expand Down Expand Up @@ -46,6 +46,7 @@ export default {
this.datepicker = new Datepicker(this.$el, this.config, this.l10n)
this.datepicker.set('onChange', (d, s) => {
this.value = s
this.$emit('input', s)
})
}
},
Expand Down

0 comments on commit a0d2e53

Please sign in to comment.