Bug when using Data while using a "defaultValue" in a field

I found a small bug in radzen, using the example you taught in the post form losing value
I used the formData to set, but in doing so the Data field, which was being set automatically, loses its value when starting the page.
Below prints of the demo

How i am setting the date:

How is in the form (case I leave the "Date" with nothing will normally run as I will show below, but will return the error of the post I said above, if I put as "FormData", it loses the value of the date field, as I will show below):


Not Working

Using this.form0.form.controls.Data.setValue isn’t something that we recommend doing.

In this case the Data of the form initializes all form controls. To specify a default value set it in the formData property itself:

formData = { Data: d }

Or just don’t set the form Data property at all. The issue discussed in the linked thread should have been fixed in Radzen 2.7.0.

1 Like