I'm creating a calendar of events with Drupal 7 using views. At the moment the elements are shown in order of the date of each one (I have a date field where I put the date of the event). Now I need that when the date is passed, it does not appear anymore.

For example, if I have an event that was held yesterday, today it would not have to appear in the view.

Thank you!

Filter criteria on views

and this is de field type

up vote 1 down vote accepted

Just add a filter based on the date field and the criteria should be "greater than or equal to", then select "Enter a relative date" in the drop down field and enter the word "now"

Here is a screenshot from a site that has a Register By date field and I have a list of Upcoming Events that show based on this in a homepage block.

enter image description here

  • Hello Travis, thanks for your answer but in the date field filter criteria I don't have this option. I have a "Operator" select and "greather than or equal to" is not in this select, and a input with the label value... So I can't find the "Enter a relative date" option. Maybe I have to install a module? – Berta Nicolau Nov 15 at 18:13
  • Can you post a screenshot of your Date Filter options? You don't need an extra module for this. Are you sure it's a Date field you created? – prkos Nov 15 at 18:48
  • Sure thing Berta, image added. – Travis Johnston Nov 15 at 20:19
  • hello! thanks for all, i have added two images: The filter criteria configuration on view screenshoot and a row where you can see the field type.. I don't know why I can't see this options – Berta Nicolau Nov 16 at 14:03
  • OWCH! Sorry, thanks for all! I just discovered that I had the "Date_views" module disabled – Berta Nicolau Nov 16 at 14:06

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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