The issue was with how I was initializing the form values. I was setting the default values to empty strings where I should have been initializing the dates to null. So I was doing this:
replicantForm = this.fb.group({
name: ['', Validators.required],
incepdate: '',
longevity: ''
})
When I should have been doing this:
replicantForm = this.fb.group({
name: ['', Validators.required],
incepdate: null,
longevity: ''
})
Many thanks to @pkozlowski-opensource for the clarification.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…