<app-common-dialog [dialogContent]="dialogContent" [dialogRef]="dialogRef">
  <ng-template #dialogContent>
    <form appFormSubmit (ngSubmit)="update()" [formGroup]="cardEditForm"
          layoutDirection="column">
      <app-form-errors #formErrors [formGroup]="cardEditForm"></app-form-errors>
      <mat-form-field class="fl-margin-top">
        <mat-label i18n>Expiry date</mat-label>
        <input placeholder="Expiry date" i18n-placeholder matInput [matDatepicker]="dp" formControlName="exp">
        <mat-hint>MM/YYYY</mat-hint>
        <mat-datepicker-toggle matSuffix [for]="dp"></mat-datepicker-toggle>
        <mat-datepicker #dp
                        startView="multi-year"
                        (monthSelected)="setMonthAndYear($event, dp)">
        </mat-datepicker>
        <mat-error>{{cardEditForm.controls.exp.errors | errorFormatter}}</mat-error>
      </mat-form-field>
    </form>
  </ng-template>
</app-common-dialog>
