Skip to content

Commit

Permalink
Respect date filter for today
Browse files Browse the repository at this point in the history
  • Loading branch information
thecalcc committed Jul 3, 2024
1 parent 23407e3 commit 36c0257
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions client/apps/Planning/PlanningList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,15 +187,12 @@ export class PlanningListComponent extends React.PureComponent<IProps> {
<PlanningListSubNav />
<ListPanel
groups={(() => {
const dateFilter = currentSearch.advancedSearch?.dates?.start;
// Date filter by default has today's value
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 36c0257

Please sign in to comment.