PrimeNG p-calendar component with minDate issue when using formcontrol

Discussão em 'Angular' iniciado por MartinaAnt, Novembro 15, 2024.

  1. MartinaAnt

    MartinaAnt Guest

    I have upgraded my project from v15 to Angular v18/PrimeNG v17 and in my component:

    <p-calendar
    dateFormat="yy-mm-dd"
    formControlName="finish_date"
    [minDate]="today"
    >
    </p-calendar>


    when I have date saved in DB and it is today or in the past, the field stays empty.

    I want to minDate only for new inputs, but the field should display dates even in the past if already saved.

    Continue reading...

Compartilhe esta Página