Angular 2+ Material datepicker input type date format

0
1275
  <mat-form-field (click)="picker.open()">
  <input matInput [readonly]="true" placeholder="Search ..." [ngModel]="searchData.dateCreated | date:'d-MMM-y'" >
  
  <input type="text" [hidden]='true'  readonly="true" matInput [matDatepicker]="picker" placeholder="Search ..." name="dateCreated" [(ngModel)]="searchData.dateCreated" (dateInput)="getVendorSpareList(pageSize,pagenumber,'')" [max]="todayDate">

  <mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
  <mat-datepicker #picker></mat-datepicker>
  </mat-form-field>

LEAVE A REPLY

Please enter your comment!
Please enter your name here