trying to get a form set up but for some reason, the Date input in my html is not binding to the object\'s date value, despite using [(ngModel)]
html:
&l
If you are using a modern browser there's a simple solution.
First, attach a template variable to the input.
Then pass the variable into your receiving method.
In your controller just accept the parameter as type HTMLInputElement and use the method valueAsDate on the HTMLInputElement.
submit(date: HTMLInputElement){
console.log(date.valueAsDate);
}
You can then manipulate the date anyway you would a normal date.
You can also set the value of your as you
would normally.
Personally, as someone trying to stay true to the unidirectional data flow, i try to stay away from two way data binding in my components.