-1
I have this input
, that I would like to click I spend the day, month and year that will appear, and not the current month, I will need to make a condition, that I already have ready, but I do not know how to pass to this input
<input matInput [matDatepicker]="paymentDate_i"
placeholder="{{ 'fields.paymentDate' | translate }}" formControlName="paymentDate"
name="paymentDate-{{ i }}" (focus)="paymentDate_i.open()" (click)="paymentDate_i.open()"
required />
I don’t want the date to appear, I want that when clicking, I came with the month and year that I put.
Thanks for the tip, it worked right.. Thank you,
– Mariana
Yes, change the template to
<mat-datepicker [startAt]="myStartAt" #picker></mat-datepicker>
. And add the variable in the ComponentmyStartAt = new Date("2018-01-05")
– Alex Parloti