0

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

1

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

http://mydomain.com/agenda/all/2012-03 

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.

|improve this answer|||||
  • 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
0

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.

|improve this answer|||||

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.