I was having some problem when trying to preset today's date to HTML component using Angular Typescript. Here is my HTML component:
<div class="d-flex">
<input id="field_tStartdate" type="date" class="form-control" name="tStartdate" [(ngModel)]="tStartdate" required />
</div>
Then in my typescript file:
tStartdate: string;
this.tStartdate = moment().toString();
However, my input field at the front end is still showing dd/MM/yyyy by default without pre-selecting today's date. Any ideas?
Thanks!