0

I have a content type with date fields . For date I am using date module. I have created a views in drupal 7 and using exposed filter. I need to show filter my data via month , Means I need to show months(next 5 months including current) in dropdown.

0

What you're wanting is Grouped Filters. It will let you set pre-defined discrete filters for your date.

Under the Views UI for your exposed data filter set Filter type to expose to Grouped Filters. You can set your arbitrary label, set your operator to is between, and Value type to An offset from the current time... in the date fields, you can use a relative PHP strtotime() format to specify a filter between the current date ("now") and 5 months into the future ("+5 month").

  • I need to may, june, july, aug, sep in label. – jsh May 30 '16 at 18:08
  • Grouped Filters will let you add fixed date ranges in addition to relative dates. – Shawn Conn May 30 '16 at 18:55

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.