Skip to content

Commit

Permalink
Fix vue-bulma#62, clear value and input UI;
Browse files Browse the repository at this point in the history
  • Loading branch information
Karl-André Gagnon committed Apr 4, 2018
1 parent bf7e6d4 commit 794f7d1
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/index.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<component :value="date" :placeholder="placeholder"
:inputClass="inputClass" :alignment="alignment"
<component :value="date" :placeholder="placeholder"
:inputClass="inputClass" :alignment="alignment"
:is="wrap ? 'WrapperInput' : 'SingleInput'">
<slot></slot>
</component>
Expand Down Expand Up @@ -59,7 +59,12 @@ export default {
this.datepicker.jumpToDate()
},
setDate (newDate, oldDate) {
newDate && this.datepicker.setDate(newDate)
if(newDate){
this.datepicker.setDate(newDate)
}else{
this.datepicker.setDate(newDate)
this.date = '';
}
},
dateUpdated (selectedDates, dateStr) {
this.date = dateStr
Expand Down

0 comments on commit 794f7d1

Please sign in to comment.