Revert e0aa79469d to rethink the behavior

pull/310/head
cagataycivici 2020-04-17 23:23:32 +03:00
parent 106e8cb807
commit e4707c955a
1 changed files with 2 additions and 9 deletions

View File

@ -322,7 +322,6 @@ export default {
default: null default: null
} }
}, },
oldViewDate: null,
navigationState: null, navigationState: null,
created() { created() {
this.updateCurrentMetaData(); this.updateCurrentMetaData();
@ -372,7 +371,7 @@ export default {
watch: { watch: {
value(newValue) { value(newValue) {
this.updateCurrentMetaData(); this.updateCurrentMetaData();
this.updateInputFieldValue(newValue || this.inputFieldValue); this.updateInputFieldValue(newValue);
} }
}, },
methods: { methods: {
@ -1916,7 +1915,6 @@ export default {
catch(err) { catch(err) {
//invalid date //invalid date
$vm.updateModel(null); $vm.updateModel(null);
$vm.inputFieldValue = val;
} }
}, },
focus: event => { focus: event => {
@ -1974,17 +1972,12 @@ export default {
}; };
}, },
viewDate() { viewDate() {
let $vm = this;
let propValue = this.value; let propValue = this.value;
if (propValue && Array.isArray(propValue)) { if (propValue && Array.isArray(propValue)) {
propValue = propValue[0]; propValue = propValue[0];
} }
let vDate = propValue || $vm.oldViewDate || new Date(); return propValue || new Date();
$vm.oldViewDate = vDate;
return vDate;
}, },
containerClass() { containerClass() {
return [ return [