I've been creaking my head on this issue, looking for answers but couldn't find anything.
I'm using Angular Material on my project and I'm using reactive forms. One of the fields on my form is a Datepicker, the problem is that I can't patch the value. I get the date from the db as number, for example: 1659495600000.
The problem is that the field always shows blank. Do I have to convert that to something else?
private initializeForm() {
this.userForm.controls['shippingDate'].patchValue(this.data.user.shipping.shippingDate);
}
/// The value for this (this.data.user.shipping.shippingDate) is 1659495600000 as a number.
Thanks
MrRobot!
Your db return date in milliseconds, you can do converting to date and after pass the value converted. Exemple to convert your date: