Angular datepicker "matDatepickerMin" error problem

Discussão em 'Angular' iniciado por Yasar Shaikh, Fevereiro 19, 2025.

  1. Yasar Shaikh

    Yasar Shaikh Guest

    I have a question that if the error "matDatepickerMin"'s message is dynamic like this :

    **<mat-error
    *ngIf="
    form.controls.date.hasError('matDatepickerMin')
    "
    >

    {{ form.controls.date.errors.message }}
    </mat-error>**


    it does not sets the error message i have set in my 'ts' file, on searching what is the problem then i got that angular is not allowing me add message when "matDatepickerMin" error is active so what can i do here beacuse i have 3 different message for "matDatepickerMin" error.

    I expect the error messages i am setting in my 'ts' file should be shown in the mat-error block

    Continue reading...

Compartilhe esta Página