Skip to content

Commit

Permalink
feat(MdDatepicker): allow reset of value after clicking cancel
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuell1 committed Jan 23, 2018
1 parent 0fd4f99 commit 561c15a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/MdDatepicker/MdDatepicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@
if (selectedDate) {
this.modelDate = this.dateToHTMLString(selectedDate)
this.$emit('input', selectedDate)
} else {
this.modelDate = null
this.$emit('input', null)
}
},
value () {
Expand Down
1 change: 1 addition & 0 deletions src/components/MdDatepicker/MdDatepickerDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@
},
onCancel () {
this.closeDialog()
this.$emit('update:mdDate', null)
},
onConfirm () {
this.closeDialog()
Expand Down

0 comments on commit 561c15a

Please sign in to comment.