Can anyone help me how to expose the date filter in a view in drupal 7.

I have added post date filter with in FILTER CRITERIA but it is not working

Can anyone help me


Here is how I used exposed filter to filter content with date (assumed you have the Date Views module enabled).

I just create a view with all fields and the in the "Advanced > CONTEXTUAL FILTERS" section, I add a new contextual filter and I select Date : Date (node). In the next box, I can select the date field to filter (publication date or any date field). I can also give a default value if no date parameters is passed through the url : for example, the current date.

And that's it, I just pass the date as URL parameter : I have something like


where /all is my first parameter, I us it to match a country for my posts, and the second parameter is the month of the post.

I hope that helps.

  • I am not able to find Date:Date(node) value in contextual filter – bharathi Feb 7 '12 at 15:53
  • 1
    I think the module Date Views is not enabled – Mika A. Feb 8 '12 at 13:42

You can add "your date filed" as filter and can expose the filter. so that the filter will appear in the front end, using that we can display the nodes that are created between two given dates.

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.