Angular FullCalendar: Conditionally Show/Hide Event Time in eventContent Based on Daily Event...

Discussão em 'Angular' iniciado por Aspiring Coder, Abril 4, 2025.

  1. I want to display both the event title and the event time for each event on that date.

    My goal is to achieve the following:

    If a particular date in the month view has more than 3 events scheduled, I want to display only the title of each event on that date. If a date has 3 or fewer events, I want to display both the event title and the event time for each event on that date.

    <full-calendar [options]="calendarOptions" #fullcalendar>
    <ng-template #eventContent let-arg>
    {{arg.event.title}}
    <div *ngIf="!arg.hideTime" class="event-time">
    {{ formatTime(arg.event.start) }}-{{ formatTime(arg.event.end) }}
    </div>
    </ng-template>
    </full-calendar>

    Continue reading...

Compartilhe esta Página