mirror of
https://github.com/tenrok/vue2-datepicker.git
synced 2026-06-23 07:00:36 +03:00
fix: type input don't change the value (#266)
This commit is contained in:
+4
-1
@@ -535,6 +535,9 @@ export default {
|
|||||||
const keyCode = event.keyCode
|
const keyCode = event.keyCode
|
||||||
// Tab 9 or Enter 13
|
// Tab 9 or Enter 13
|
||||||
if (keyCode === 9 || keyCode === 13) {
|
if (keyCode === 9 || keyCode === 13) {
|
||||||
|
// ie emit the watch before the change event
|
||||||
|
this.handleChange()
|
||||||
|
this.userInput = null
|
||||||
this.popupVisible = false
|
this.popupVisible = false
|
||||||
event.stopPropagation()
|
event.stopPropagation()
|
||||||
}
|
}
|
||||||
@@ -543,8 +546,8 @@ export default {
|
|||||||
this.userInput = event.target.value
|
this.userInput = event.target.value
|
||||||
},
|
},
|
||||||
handleChange () {
|
handleChange () {
|
||||||
const value = this.text
|
|
||||||
if (this.editable && this.userInput !== null) {
|
if (this.editable && this.userInput !== null) {
|
||||||
|
const value = this.text
|
||||||
const checkDate = this.$refs.calendarPanel.isDisabledTime
|
const checkDate = this.$refs.calendarPanel.isDisabledTime
|
||||||
if (!value) {
|
if (!value) {
|
||||||
this.clearDate()
|
this.clearDate()
|
||||||
|
|||||||
Reference in New Issue
Block a user