diff --git a/src/Client/src/app/site/schedule/schedule.component.ts b/src/Client/src/app/site/schedule/schedule.component.ts index 9adf16f..f97bbd5 100644 --- a/src/Client/src/app/site/schedule/schedule.component.ts +++ b/src/Client/src/app/site/schedule/schedule.component.ts @@ -14,7 +14,10 @@ export class ScheduleComponent implements OnInit { constructor(private _client: Client) {} ngOnInit() { - this._client.getAllEvents().subscribe(data => (this.events = this.orderDates(data))); + const currentYear = new Date().getFullYear(); + this._client.getAllEvents().subscribe(data => { + this.events = this.orderDates(data).filter(evt => evt.startDate.getFullYear() >= currentYear); + }); } private orderDates(events: Array): Array {