From 65ecb9fb973419f9a167a1c5df9fddd3ca72a7db Mon Sep 17 00:00:00 2001 From: tugcekucukoglu Date: Wed, 24 Apr 2024 13:13:07 +0300 Subject: [PATCH] Fixed #4938 - Calendar: Input value is not updated when model is changed externally --- components/lib/calendar/Calendar.vue | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/components/lib/calendar/Calendar.vue b/components/lib/calendar/Calendar.vue index 53414b618..52af296eb 100755 --- a/components/lib/calendar/Calendar.vue +++ b/components/lib/calendar/Calendar.vue @@ -563,14 +563,17 @@ export default { id: function (newValue) { this.d_id = newValue || UniqueComponentId(); }, - modelValue(newValue) { - this.updateCurrentMetaData(); + modelValue: { + deep: true, + handler(newValue) { + this.updateCurrentMetaData(); - if (!this.typeUpdate && !this.inline && this.input) { - this.input.value = this.formatValue(newValue); + if (!this.typeUpdate && !this.inline && this.input) { + this.input.value = this.formatValue(newValue); + } + + this.typeUpdate = false; } - - this.typeUpdate = false; }, showTime() { this.updateCurrentMetaData();