<mat-form-field appearance="outline" fxFlex="33" class="pr-4">
<mat-label>End Date</mat-label>
<input matInput [matDatepicker]="endDatePicker" (dateChange) ="addEventEndDate(form.get('startDate').value,$event)" name="endDate" formControlName="endDate"
readonly=true>
<mat-datepicker-toggle matSuffix [for]="endDatePicker"></mat-datepicker-toggle>
<mat-datepicker #endDatePicker></mat-datepicker>
</mat-form-field>
, когда я пытаюсь добавить согласие, у которого нет даты окончания, на экране не отображается форма, и в консоли я получаю эту ошибку
ng:///EventsCalendarModule/ParentConsentFormComponent_Host.ngfactory.js:5 ERROR Error: InvalidPipeArgument: 'Unable to convert "null" into a date' for pipe 'DatePipe'
at invalidPipeArgumentError (vendor.js:29059)
at DatePipe.push../node_modules/@angular/common/fesm5/common.js.DatePipe.transform (vendor.js:29986)
at ParentConsentFormComponent.push../src/app/main/events_calendar/parentConsents/parent-consent-form.ts.ParentConsentFormComponent.createForm (main.js:25699)
at ParentConsentFormComponent.push../src/app/main/events_calendar/parentConsents/parent-consent-form.ts.ParentConsentFormComponent.ngOnInit (main.js:25663)
at checkAndUpdateDirectiveInline (vendor.js:82617)
at checkAndUpdateNodeInline (vendor.js:83881)
at checkAndUpdateNode (vendor.js:83843)
at debugCheckAndUpdateNode (vendor.js:84477)
at debugCheckDirectivesFn (vendor.js:84437)
at Object.eval [as updateDirectives] (ng:///EventsCalendarModule/ParentConsentFormComponent_Host.ngfactory.js:11)