0

I have a content type which has a date field indicating a period of date, and I want to be able to filter a view with a date range within a single exposed filter with these 4 criteria:

  1. input start date <= content start date & input end date >= content end date
  2. input start date <= content start date & input end date <= content end date
  3. input start date >= content start date & input end date >= content end date
  4. input start date >= content start date & input end date <= content end date

I've tried installing views between dates filter but it only works if I have a single date, not a date range. Any suggestions?

  • The "&" is pretty confusing here as to what it means. I think you maybe mean or? I would consider separating out the input from content and thinking about it that way. You can hide exposed filters from view and then change them via JS, if the single (visible) exposed filter is your pain point. – Alex Finnarn Mar 3 '15 at 23:42
  • No, these 4 criteria are joined by an OR operator, but each criteria itself is joined by an AND. The thing is, I need to apply this 4 criteria to a range date set by an only exposed filter. But the way i'm seeing it, I will have to enable a pair of input fields for each range, as far as I understand Drupal views behavior. – Anyul Rivas Mar 4 '15 at 11:07

Your Answer

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

Browse other questions tagged or ask your own question.