<my-date-picker name="outOldestDate" class="form-control required" placeholder="Oldest" [options]="myDatePickerOptions formControlName="outOldestDate"></my-date-picker>
public myDatePickerOptions: IMyDpOptions = {
    // other options...
    dateFormat: 'yyyy-mm-dd'
};
    ngOnInit() {
        this.accountReceivableForm = this.formBuilder.group({
          outOldestDate: [null, Validators.required]
        });
this.getDate();
}
getDate(): void {
//service call happens here
 resultArray => {
        this.ng4LoadingSpinnerService.hide();
        console.log(resultArray);
        this.ARHospitalListData = resultArray;
        this.outOldestDate = this.ARHospitalListData.dischargeDate.fromDate;
}
}