Skip to content

Commit

Permalink
fix: removed date filters previously set with getCalendarResults (#487)
Browse files Browse the repository at this point in the history
  • Loading branch information
sabrina-bongiovanni authored Jan 16, 2024
1 parent e6ea0d5 commit 42aa789
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/ItaliaTheme/Blocks/Calendar/Item.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,19 @@ const Item = ({ day, path, query, inEditMode, data }) => {
const dayStart = _day.startOf('day').format('YYYY/MM/DD HH:mm');
const dayEnd = _day.endOf('day').format('YYYY/MM/DD HH:mm');

// remove date filters previously set for getCalendarResults in Body
const filtersWithoutDate = query.query.filter(
(el) => !el.o.includes('.date.'),
);

useDeepCompareEffect(() => {
dispatch(
getCalendarDayResults(
path,
{
...query,
query: [
...query.query,
...filtersWithoutDate,
{
i: 'start',
o: 'plone.app.querystring.operation.date.between',
Expand Down

0 comments on commit 42aa789

Please sign in to comment.