-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Closed
Description
Bug?
I have this Date Picker example
<mat-form-field>
<input matInput [(ngModel)]="from" [matDatepicker]="from" (change)="onChangeEvent($event)" placeholder="From">
<mat-datepicker-toggle matSuffix [for]="from"></mat-datepicker-toggle>
<mat-datepicker #from></mat-datepicker>
</mat-form-field>import {Component} from '@angular/core';
@Component({
selector: 'date-filter',
templateUrl: 'date.filter.html',
})
export class DateFilter {
from: any;
onChangeEvent(e): void {
console.log(e.target.value);
console.log('this.from = ', this.from);
}
}What is the expected behavior?
On date change i should have the value in this.form.
What is the current behavior?
It doesn't update the model and i get this error: Uncaught Error: Cannot assign to a reference or variable!.
Metadata
Metadata
Assignees
Labels
No labels