Skip to content
This repository was archived by the owner on Mar 21, 2021. It is now read-only.

Commit 4ff3aef

Browse files
committed
feat: map all dates from server in HTTP services
1 parent aa9ff52 commit 4ff3aef

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

generators/entity-client/templates/vue/src/main/webapp/app/entities/entity-update.component.ts.ejs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,17 @@ export default class <%= entityAngularName %>Update extends <% if (fieldsContain
186186
return null;
187187
}
188188
189+
public convertDateTimeArrayFromServer(dates: Date[]): string[] {
190+
if (dates) {
191+
const convertedDates = [];
192+
dates.forEach(date => {
193+
convertedDates.push(format(date, DATE_TIME_LONG_FORMAT));
194+
});
195+
return convertedDates;
196+
}
197+
return null;
198+
}
199+
189200
public updateInstantField(field, event) {
190201
if (event.target.value) {
191202
this.<%= entityInstance %>[field] = parse(event.target.value, DATE_TIME_LONG_FORMAT, new Date());

0 commit comments

Comments
 (0)