0

I have a content type that has a start_date and end_date fields.

I need to make a view with a filter: start_period - end_period

The view should select all nodes where the two periods overlap, for example:

node: 1 jan 2015 - 31 Dec 2015

filter values to select this node could be: 1 oct 2014 - 1 feb 2015 1 oct 2014 - 1 mar 2016 1 apr 2015 - 1 may 2015 1 apr 2015 - 1 mar 2016

Filter values that do not select the node could be: 1 oct 2014 - 1 dec 2014 1 jan 2016 - 1 mar 2016

Is there a module to do that? thank you in advance

0

Try contextual range filter module that lets you define a range filter applies that rule

Start value <= Filter value >= End value.

For your case you have to define two filters.

for start date with that rule

filter start date <= node start date >= filter end date.

for end date with that rule

filter start date <= node end date >= filter start date.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.