From 94162c796cf5016634eccdeb18fc132711055eb2 Mon Sep 17 00:00:00 2001 From: tykayn Date: Sat, 7 Nov 2020 20:12:20 +0100 Subject: [PATCH] add time to date func --- src/app/features/administration/form/form.component.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/features/administration/form/form.component.ts b/src/app/features/administration/form/form.component.ts index d8402339..ebf6c9cb 100644 --- a/src/app/features/administration/form/form.component.ts +++ b/src/app/features/administration/form/form.component.ts @@ -292,7 +292,11 @@ export class FormComponent implements OnInit { * @param id */ addTimeToDate(config: any, id: number) { - this.timeList.push({ literal: '' }); + this.timeList.push({ + literal: '', + timeList: [], + date_object: new Date(), + }); const selector = '[ng-reflect-choice_label="dateTime_' + id + '_Choices_' + (this.timeList.length - 1) + '"]'; this.cd.detectChanges(); const elem = this.document.querySelector(selector);