@@ -86,7 +86,7 @@ export default {
8686 ... this .inputAttrs ,
8787 },
8888 on: {
89- input : event => ( this .inputValue = event . target . value ) ,
89+ input: this .inputInput ,
9090 change: this .inputChange ,
9191 keyup: this .inputKeyup ,
9292 },
@@ -113,9 +113,9 @@ export default {
113113 availableDates: null ,
114114 formats: Object , // Resolved by computed property
115115 inputProps: { type: Object , default : () => ({}) }, // Resolved by computed property
116- updateOnInputKeyup : {
116+ updateOnInput : {
117117 type: Boolean ,
118- default : () => defaults .datePickerUpdateOnInputKeyup ,
118+ default : () => defaults .datePickerUpdateOnInput ,
119119 },
120120 tintColor: { type: String , default : () => defaults .datePickerTintColor },
121121 dragAttribute: Object , // Resolved by computed property
@@ -415,6 +415,15 @@ export default {
415415 }
416416 }
417417 },
418+ inputInput (e ) {
419+ this .inputValue = e .target .value ;
420+ if (this .updateOnInput ) {
421+ this .updateValue (this .inputValue , {
422+ formatInput: false ,
423+ hidePopover: false ,
424+ });
425+ }
426+ },
418427 inputChange () {
419428 // Enter key, blur or other change events
420429 this .updateValue (this .inputValue , {
@@ -429,21 +438,17 @@ export default {
429438 formatInput: true ,
430439 hidePopover: true ,
431440 });
432- // All other keys
433- } else if (e .keyCode !== 13 && this .updateOnInputKeyup ) {
434- this .updateValue (this .inputValue , {
435- formatInput: false ,
436- hidePopover: false ,
437- });
438441 }
439442 },
440443 updateValue (
441444 value = this .inputValue ,
442445 {
443- formatInput = true ,
446+ formatInput = false ,
444447 hidePopover = ! this .popoverKeepVisibleOnInput ,
445448 } = {},
446449 ) {
450+ // Reassign input value for good measure
451+ this .inputValue = isString (value) ? value : this .inputValue ;
447452 // Parse value if needed
448453 const parsedValue = isString (value)
449454 ? this .profile .parseValue (value)
0 commit comments