From e4707c955ad1e665985a722f26f6aca7b16c641a Mon Sep 17 00:00:00 2001 From: cagataycivici Date: Fri, 17 Apr 2020 23:23:32 +0300 Subject: [PATCH] Revert e0aa79469da52de9d4dd8298609de47701214770 to rethink the behavior --- src/components/calendar/Calendar.vue | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/components/calendar/Calendar.vue b/src/components/calendar/Calendar.vue index b24783112..b152f9799 100644 --- a/src/components/calendar/Calendar.vue +++ b/src/components/calendar/Calendar.vue @@ -322,7 +322,6 @@ export default { default: null } }, - oldViewDate: null, navigationState: null, created() { this.updateCurrentMetaData(); @@ -372,7 +371,7 @@ export default { watch: { value(newValue) { this.updateCurrentMetaData(); - this.updateInputFieldValue(newValue || this.inputFieldValue); + this.updateInputFieldValue(newValue); } }, methods: { @@ -1916,7 +1915,6 @@ export default { catch(err) { //invalid date $vm.updateModel(null); - $vm.inputFieldValue = val; } }, focus: event => { @@ -1974,17 +1972,12 @@ export default { }; }, viewDate() { - let $vm = this; let propValue = this.value; if (propValue && Array.isArray(propValue)) { propValue = propValue[0]; } - let vDate = propValue || $vm.oldViewDate || new Date(); - - $vm.oldViewDate = vDate; - - return vDate; + return propValue || new Date(); }, containerClass() { return [