3 thoughts on “Investigate compatibility with reactive forms

  1. Yes I had/have this working,

    this.oForm = this.fb.group({
        oHForm: this.fb.group({ // create nested formgroup to pass to child
            selectTypeahead: ['', Validators.required],
            ohDatePicker: [],
            }),	
    })
    

    Shows how to setup a form group for typeahead and datePickers

    Template, datepicker:

    <input class="form-control" placeholder="dd-mm-yyyy"
         id="oh_date_picker"
         formControlName="ohDatePicker"
         name="dp"  
         ngbDatepicker #d="ngbDatepicker">
    

    Template typeahead:

    <input type="text" class="form-control" 
        formControlName=" selectTypeahead"
        [ngbTypeahead]="search" 
        
        (selectItem)="taMatch($event)"
        [resultTemplate]="rt" [inputFormatter]="formatter" autofocus tabindex="0" #msgFocous/>
    

    Hope this helps someone.