Merged PR 1410: #3503 IPad Sortierung im TK falsh

#3503 IPad Sortierung im TK falsh
This commit is contained in:
Lorenz Hilpert
2022-10-17 13:40:33 +00:00
committed by Andreas Schickinger
parent 1e4e6da44e
commit a021ac0da3
3 changed files with 3 additions and 3 deletions

View File

@@ -353,6 +353,6 @@ export class DomainTaskCalendarService {
getDateGroupKey(d: string) {
// Get Date as string key to ignore time for grouping
const date = new Date(d);
return `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`;
return date.toISOString().split('T')[0];
}
}

View File

@@ -34,7 +34,7 @@ export class TaskSearchComponent implements OnInit, AfterViewInit {
displayItems$ = this.searchResults$.pipe(
map((r) => {
const grouped = groupBy(r, this.byDate);
grouped.sort((a, b) => new Date(a.group).getTime() - new Date(b.group).getTime());
grouped.sort((a, b) => this.dateAdapter.parseDate(a.group).getTime() - this.dateAdapter.parseDate(b.group).getTime());
return grouped;
}),
// Sortierung der aufgaben nach Rot => Gelb => Grau => Grün

View File

@@ -85,7 +85,7 @@ export class DateAdapter {
}
parseDate(date: string) {
return new Date(date);
return moment(date).toDate();
}
today(): Date {