<input class="alert-input date-input" #dob="ngModel" name="dob" max="2018-03-07" [(ngModel)]="leadDetail.dob" type="date"></div>
Is there a way to dynamically set the max date to today instead of 2018-03-07?
I have tried a couple of methods but without success:
<input max="today" type="date"></div>
<input max="{{today | date:'yyyy-mm-dd'}}" type="date"></div>
Class -
public today = new Date();
but unfortunately it did not work as expected.