Haridhass Mani

Haridhass Mani

  • 551
  • 2.3k
  • 578.4k

How to bind string value in angular datepicker inputbox?

Jan 13 2021 4:14 PM
I am trying the Angular Material Date picker input box and am type for DD/MMM/YYYY Or MMM/YYYY Or (any string value) require the user to click on button am get (any string value) and assign date picker input box.
 
<mat-icon>
<a mat-flat-button (click)="Datepiker()">s</a> </mat-icon>
<input matInput placeholder="Course Completion" formControlName="Completion" maxlength="60" #courseCompte (click)="course.open()" [matDatepicker]="course" (keyup)="Compte.value =Compte.value.toUpperCase()"/> <mat-datepicker #course></mat-datepicker>
Datepiker() {
this.mainForm.get(this.formgroupName).get('Completion').setValue("Provide");
}

Answers (3)