Skip to content

Commit

Permalink
Merge pull request #38 from kleinrein/fix/input-change-event
Browse files Browse the repository at this point in the history
Add change emit on month picker input
  • Loading branch information
kleinrein committed Aug 29, 2020
2 parents dbbf6c0 + 713de12 commit 3644ae9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions example/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@
:min-date="minDate !== null ? new Date(minDate) : null"
:year-only="isYearOnly"
:no-default="true"
@change="showDate"
/>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-month-picker",
"version": "1.3.0",
"version": "1.3.1",
"main": "src/index.js",
"description": "A simple and elegant month picker for Vue",
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions src/MonthPicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ export default {
this.currentMonthIndex = index
this.onChange()
if (input) {
this.$emit('input', this.date)
}
Expand Down
2 changes: 2 additions & 0 deletions src/MonthPickerInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
:min-date="minDate"
:year-only="yearOnly"
@input="populateInput"
@change="$emit('change', $event)"
/>
</div>
</template>
Expand Down Expand Up @@ -58,6 +59,7 @@ export default {
},
mixins: [monthPicker],
emits: [
'change',
'input'
],
data() {
Expand Down

0 comments on commit 3644ae9

Please sign in to comment.