Angular PrimNG monthselector - how to highlight the current month

Discussão em 'Angular' iniciado por Babulaas, Dezembro 4, 2024.

  1. Babulaas

    Babulaas Guest

    I am using Primeng for a monthselector

    <p-calendar
    [(ngModel)]="date"
    view="month"
    dateFormat="mm/yy"
    inline:"true"
    [readonlyInput]="true">
    <ng-template pTemplate="date" let-date>
    <span [class.active-month]="isActiveMonth(date)">{{date.month}}+</span>
    </ng-template>
    </p-calendar>


    The pTemplate part will not be triggered when it's in monthview only if the days are shown (remove the view property).

    is there a way to highlight the current month when the component is loaded. Selecting a month works fine.

    Also how do you get maxdate working with months iso days

    Continue reading...

Compartilhe esta Página