Skip to content

Commit

Permalink
Fix missing page parameter in 'update:frompage' and 'update:topage' e…
Browse files Browse the repository at this point in the history
…vents (Closes #125). Rename 'update-on-keyup' prop to 'update-on-input-keyup'.
  • Loading branch information
Nathan Reyes committed Apr 12, 2018
1 parent e7b0f1c commit 9e97e86
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# v0.9.3
## Bug Fixes
### `v-calendar`
* Fix bug where initial `update:frompage` and `update:topage` events missing page argument. Closes #125.

### `v-date-picker`
* Fix bug where `formats` prop not getting forwarded to `v-calendar`. Closes #123.

Expand All @@ -9,7 +12,7 @@

## Improvements
### `v-date-picker`
* Added `update-on-keyup` prop to update picker selection on every `keyup` event.
* Added `update-on-input-keyup` prop to update picker selection on every `keyup` event.
* Custom slot method `updateValue` can now accept options as the second parameter. Closes #118.

| Property | Description | Default Value |
Expand Down
2 changes: 1 addition & 1 deletion src/components/CalendarPane.vue
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ export default {
this.page_ = this.loadPage(this.page);
} else {
this.page_ = this.loadPage(todayComps);
this.$emit('update:page');
this.$emit('update:page', this.page_);
}
this.preloadPages();
},
Expand Down
6 changes: 3 additions & 3 deletions src/components/DatePicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ export default {
availableDates: null,
formats: Object, // Resolved by computed property
inputProps: { type: Object, default: () => ({}) }, // Resolved by computed property
updateOnKeyup: {
updateOnInputKeyup: {
type: Boolean,
default: () => defaults.datePickerUpdateOnKeyup,
default: () => defaults.datePickerUpdateOnInputKeyup,
},
tintColor: { type: String, default: () => defaults.datePickerTintColor },
dragAttribute: Object, // Resolved by computed property
Expand Down Expand Up @@ -422,7 +422,7 @@ export default {
});
},
inputKeyup(e) {
if (e.keyCode !== 13 && this.updateOnKeyup) {
if (e.keyCode !== 13 && this.updateOnInputKeyup) {
this.updateValue(this.inputValue, {
formatInput: false,
hidePopover: false,
Expand Down
2 changes: 1 addition & 1 deletion src/utils/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const defaults = {
placeholder: `${format} - ${format}`,
}),
}),
datePickerUpdateOnKeyup: true,
datePickerUpdateOnInputKeyup: true,
datePickerTintColor: '#66B3CC',
datePickerShowCaps: false,
datePickerShowDayPopover: true,
Expand Down

0 comments on commit 9e97e86

Please sign in to comment.