Search code examples
angularcalendarangular7primeng

PrimeNg calendar in angular displaying dates in 6 rows


I am using the PrimeNg calendar in my Angular7 project. by default, the calendar displays the date in 6 rows for all months, which is quite unusual. even if the last date of the selected month ends within 5 rows, 6th row displaying. How to avoid this 6th row any ideas

   <p-calendar  class="WorkTimeCalender" [(ngModel)]="workingDate"  
    [inline]="true"  [disabledDays]="[0,6]"  >                                       
    </p-calendar>

enter image description here


Solution

  • You can apply the following property to the calendar to not show that 6th row:

     [showOtherMonths]="false"