【发布时间】:2021-02-09 10:20:16
【问题描述】:
这个问题在开发者控制台或 Spring 后端没有错误。尝试使用响应式表单和patchValue 编辑现有记录时,日期字段为空。
日期输入代码:
<div class="p-field p-col">
<label for="dueDate">Due Date</label>
<p-calendar formControlName="dueDate" id="dueDate" showButtonBar="true" [showIcon]="true" placeholder="mm/dd/yyyy"></p-calendar>
</div>
编辑功能:
edit(id) {
this._tasksService.getDetails(id).subscribe( x => {
this.id = id;
this.taskForm.patchValue(x);
this.taskDialog = true;
})
}
【问题讨论】:
标签: angular spring-boot spring-mvc primeng