diff --git a/app/javascript/dashboard/components/CustomAttribute.vue b/app/javascript/dashboard/components/CustomAttribute.vue index b11350d2d..a1dad74c4 100644 --- a/app/javascript/dashboard/components/CustomAttribute.vue +++ b/app/javascript/dashboard/components/CustomAttribute.vue @@ -66,7 +66,7 @@ {{ value || '---' }}

- {{ formattedValue || '---' }} + {{ displayValue || '---' }}

({ id: index + 1, @@ -175,6 +181,9 @@ export default { isAttributeTypeLink() { return this.attributeType === 'link'; }, + isAttributeTypeDate() { + return this.attributeType === 'date'; + }, notAttributeTypeCheckboxAndList() { return !this.isAttributeTypeCheckbox && !this.isAttributeTypeList; }, @@ -190,7 +199,7 @@ export default { } return this.$t('CUSTOM_ATTRIBUTES.VALIDATIONS.REQUIRED'); }, - formattedValue() { + displayValue() { if (this.attributeType === 'date') { return format(new Date(this.editedValue), 'dd-MM-yyyy'); } @@ -198,6 +207,7 @@ export default { }, }, mounted() { + this.editedValue = this.formattedValue; bus.$on(BUS_EVENTS.FOCUS_CUSTOM_ATTRIBUTE, focusAttributeKey => { if (this.attributeKey === focusAttributeKey) { this.onEdit();