I want to make a Drupal view showing CiviCRM Relationships and I want to expose the start and end date as exposed filters.

I want the user to have a nice GUI for picking the start and end date so I installed the required modules for displaying a jQuery date picker.

However, the CivCRM Relationship Start and End Dates do not seem to be recognised by Drupal as date fields.

I am trying to follow these instructions on how to properly set up a date filter on a view:


But as you can see from the screenshot, I am unable to do the first step, because "date" is not an option in the "filter" dropdown.

enter image description here

I can select the start and end dates anyway, of course. But then I do not get all the date-specific options like "Date selection form element" or "Filter Granularity".

Am I right, or am I missing something?

Do you know if any attempts have been made to fix this in core?

Interestingly, when setting the same fields as sort fields, they do seem to be treated as dates: enter image description here

  • 1
    I suspect this is something that no one has added in the Views code for those specific date fields. Might only take an hour of a developers time to get sorted but that isn't much help if you don't want to/can't expend that effort/money to fix this.
    – petednz - fuzion
    Apr 18 '18 at 19:53
  • I'll have a go. It's a nice itch to scratch. I guess it's not in core but in the civicrm_views module? I suspect your estimate of 1 hour is for someone who is already familiar with the code in that module. It will probably take me rather longer, but I'll let you know!
    – naomi
    Apr 19 '18 at 6:10
  • Good luck - yep the drupal module that ships with civi core
    – petednz - fuzion
    Apr 19 '18 at 21:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.