Template form issues

I am trying to set a date when load the component, like this:
It worked in the normal form, but in the template form this show a error "Cannot read property 'setValue' of undefined", using the console I've seen that "Data" is like undefinid in load, but when you give the submit in form it already exists, because it is not created before the other form? or would it have a solution?
I tryed with "this.form0.components._results[0].value = d", but the radzen return the error: "ERROR in src/app/add-tarefa/add-tarefa.component.ts(24,31): error TS2341: Property '_results' is private and only accessible within class 'QueryList'."

Just set the Value property of the required component to e.g. ${date}. Using controls.fieldname.setValue relies too much on the internal implementation and as a result broke when you use TemplateForm instead of Form.

  1. In the page load event add a Set property action. Set Name to date and Value to new Date()
  2. Add another action of Execute JavaScript type. Set code to ${date}.setHours(0, 0, 0)
  3. Set the Value property of your DatePicker to ${date}
1 Like