Skip to content

Commit

Permalink
Respect date filter for today (#2014)
Browse files Browse the repository at this point in the history
  • Loading branch information
thecalcc authored Jul 3, 2024
1 parent 29df354 commit 8be3513
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions client/apps/Planning/PlanningList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,15 +187,11 @@ export class PlanningListComponent extends React.PureComponent<IProps> {
<PlanningListSubNav />
<ListPanel
groups={(() => {
const dateFilter = currentSearch.advancedSearch?.dates?.start;
const dateFilter = currentSearch.advancedSearch?.dates?.start ?? moment().date();

if (dateFilter != null) {
return groups.filter((group) =>
moment(group.date).isSameOrAfter(dateFilter),
);
}

return groups;
return groups.filter((group) =>
moment(group.date).isSameOrAfter(dateFilter),
);
})()}
onItemClick={openPreview}
onDoubleClick={edit}
Expand Down

0 comments on commit 8be3513

Please sign in to comment.