Answer the question
In order to leave comments, you need to log in
Mat-darepicker not taking date from ngModel?
<mat-form-field class="full-width-field">
<input matInput [(ngModel)]="form.date_to" [matDatepicker]="picker" placeholder="Дата задачи">
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
<mat-datepicker #picker></mat-datepicker>
</mat-form-field>
form = {
id: null,
user_id: null,
comment: null,
type: null,
date_to: null,
task_object: null,
};
initFormValues() {
Object.assign(this.form, this.data['model']);
this.form.date_to = moment(this.data['model']['date_to']); //делал и так
}
let dialogRef = this.dialog.open(TasksEditModalComponent, {
width: '650px',
minHeight: '250px',
data:
{
model: task,
users: users,
}
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question