Body: <p>I want to make a Drupal view showing CiviCRM Relationships and I want to expose the start and end date as exposed filters.</p>
  
  <p>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.</p>
  
  <p>However, the CivCRM Relationship Start and End Dates do not seem to be recognised by Drupal as date fields.</p>
  
  <p>I am trying to follow these instructions on how to properly set up a date filter on a view:</p>
  
  <p><a href="https://www.drupal.org/node/2481343" rel="noreferrer">https://www.drupal.org/node/2481343</a></p>
  
  <p>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. </p>
  
  <p><a href="https://i.sstatic.net/fUaGJ.png" rel="noreferrer"><img src="https://i.sstatic.net/fUaGJ.png" alt="enter image description here"></a></p>
  
  <p>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".</p>
  
  <p>Am I right, or am I missing something?</p>
  
  <p>Do you know if any attempts have been made to fix this in core? </p>
  
  <p>Interestingly, when setting the same fields as sort fields, they do seem to be treated as dates:
  <a href="https://i.sstatic.net/sLuzd.png" rel="noreferrer"><img src="https://i.sstatic.net/sLuzd.png" alt="enter image description here"></a></p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-04-18T19:53:12.803Z
Comments.Text: 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.
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-04-19T06:10:54.140Z
Comments.Text: 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!
Comments.UserDisplayName: naomi
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-04-19T21:01:29.200Z
Comments.Text: Good luck - yep the drupal module that ships with civi core
Comments.UserDisplayName: petednz - fuzion
Tags: <drupal><drupal-views><dates>
Title: CiviCRM date fields in Drupal views
ThreadText: # CiviCRM date fields in Drupal views
  
  (Asked by: username_0 on 2018-04-18)
  
  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:
  
  <https://www.drupal.org/node/2481343>
  
  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](https://i.sstatic.net/fUaGJ.png)](https://i.sstatic.net/fUaGJ.png)
  
  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](https://i.sstatic.net/sLuzd.png)](https://i.sstatic.net/sLuzd.png)
  
  **Tags:** drupal, drupal-views, dates
  
  > **Comments:**
  > **username_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.  
  > **username_0**: 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!  
  > **username_1**: Good luck - yep the drupal module that ships with civi core  
  
  ---
  
  ## 0 answers
  
  