Skip to content

Commit

Permalink
feat(MdDatepicker): emit date without confirming (#1426)
Browse files Browse the repository at this point in the history
* feat(MdDatepicker): emite date without confirming

* feat(MdDatepicker): allow reset of value after clicking cancel

* Revert "feat(MdDatepicker): allow reset of value after clicking cancel"

This reverts commit 561c15a.

* feat(MdDatepicker): allow field to be clearable
  • Loading branch information
Samuell1 authored and marcosmoura committed Jan 24, 2018
1 parent 74aee23 commit e4af731
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/MdDatepicker/MdDatepicker.vue
@@ -1,5 +1,5 @@
<template>
<md-field :class="['md-datepicker', { 'md-native': !this.mdOverrideNative }]">
<md-field :class="['md-datepicker', { 'md-native': !this.mdOverrideNative }]" md-clearable>
<md-date-icon class="md-date-icon" @click.native="toggleDialog" />
<md-input :type="type" ref="input" v-model="modelDate" @focus.native="onFocus" pattern="[0-9]{4}-[0-9]{2}-[0-9]{2}" />

Expand Down
1 change: 1 addition & 0 deletions src/components/MdDatepicker/MdDatepickerDialog.vue
Expand Up @@ -314,6 +314,7 @@
selectDate (day) {
this.currentDate = setDate(this.currentDate, day)
this.selectedDate = this.currentDate
this.$emit('update:mdDate', this.selectedDate)
},
closeDialog () {
this.$emit('md-closed')
Expand Down

0 comments on commit e4af731

Please sign in to comment.