错误:无法将“无效日期”转换为角度格式的日期

问题描述 投票:0回答:1
angular forms date angular-reactive-forms
1个回答
0
投票

日期选择器不接受空字符串,请使用

null
作为初始值。

initializeAboutForm(): void {
  this.aboutForm = this.formBuilder.group({
    obsolete_date: new FormControl(null),
  });
}
© www.soinside.com 2019 - 2024. All rights reserved.