diff --git a/generators/entity-client/templates/vue/src/main/webapp/app/entities/entity-update.component.ts.ejs b/generators/entity-client/templates/vue/src/main/webapp/app/entities/entity-update.component.ts.ejs index d11b8c69..00fff4a2 100644 --- a/generators/entity-client/templates/vue/src/main/webapp/app/entities/entity-update.component.ts.ejs +++ b/generators/entity-client/templates/vue/src/main/webapp/app/entities/entity-update.component.ts.ejs @@ -179,9 +179,16 @@ export default class <%= entityAngularName %>Update extends <% if (fieldsContain if ([ 'Instant', 'ZonedDateTime' ].includes(fieldType) && !dateFunctionIncluded) { dateFunctionIncluded = true; _%> - public convertDateTimeFromServer(date: Date): string { + public convertDateTimeFromServer(date: Date): Date { if (date) { - return format(date, DATE_TIME_LONG_FORMAT); + return date; + } + return null; + } + + public convertDateTimeArrayFromServer(dates: Date[]): Date[] { + if (dates) { + return dates; } return null; } diff --git a/generators/entity-client/templates/vue/src/test/javascript/spec/app/entities/entity-management-update.component.spec.ts.ejs b/generators/entity-client/templates/vue/src/test/javascript/spec/app/entities/entity-management-update.component.spec.ts.ejs index 9c3b92c1..f08f8187 100644 --- a/generators/entity-client/templates/vue/src/test/javascript/spec/app/entities/entity-management-update.component.spec.ts.ejs +++ b/generators/entity-client/templates/vue/src/test/javascript/spec/app/entities/entity-management-update.component.spec.ts.ejs @@ -127,7 +127,7 @@ describe('Component Tests', () => { const convertedDate = comp.convertDateTimeFromServer(date); // THEN - expect(convertedDate).toEqual(format(date, DATE_TIME_LONG_FORMAT)); + expect(convertedDate).toEqual(date); }); it('Should not convert date if date is not present', () => {