0

I have a content type with a Date text field. User can enter from and to dates to control when this node will display. In my views filter, I'm adding both the from and to fields. 'From' is less than or equal to now and 'To' is greater than or equal to now.

The resulting query is not combining the range of dates, so all nodes show up in the result set.

Can I resolve this with just Date module? I don't want to use scheduler.

Drupal 6
Date 6.x-2.9

1 Answer 1

2

You need to select Method of handling multiple date fields in the same query as AND in the view exposed field setting.

enter image description here

Click on the * icon next to field in exposed filters section as shown below to complete above setting.

enter image description here

3
  • Thanks Anil! I saw Method and thought that only applied if when selecting multiple Date field(s) from the options above it.
    – cannanso
    Mar 18, 2014 at 18:27
  • So the client now wants 3 date ranges. Basically I would need three OR statements, each with two AND statements to combine the fields. I've tried every combination but I can't achieve this in the resulting views query. Ideas?
    – cannanso
    Mar 19, 2014 at 17:41
  • Ended up using Views OR module for this type of complex query.
    – cannanso
    Mar 19, 2014 at 18:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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