Sorting events on a day by their starting time
All checks were successful
Jenkins Production Deployment

This commit is contained in:
Patrick Müller 2021-10-02 13:13:27 +02:00
parent 347875390f
commit d7c9fc9265

View File

@ -18,6 +18,9 @@ export class DayComponent implements OnInit {
ngOnInit(): void { ngOnInit(): void {
this.weekDayName = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'][this.dayOfWeek]; this.weekDayName = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'][this.dayOfWeek];
this.events = this.events.sort((a, b) => {
return new Date(a.latest_start_date.toString()).getTime() - new Date(b.latest_start_date.toString()).getTime()
});
} }
} }