I have a materialize datepicker in Angular 2 and I can not get the input model
component.html
<form name="assignPeriodo_form" (ngSubmit)="assign_periodo()" >
<div class="col m6">
<i class="material-icons prefix">date_range</i>
<label for="expires">Fecha Fin</label>
<input [(ngModel)]="model.expires" id="expires" name="expires" type="date" class="datepicker" required>
</div>
</form>
component.ts
assign_periodo(){
console.log(this.model.expires);
}
I receive undefined
all the time.
I've seen similar issues with the bs as the link but it does not work the same way link