What configuration is required to use date_views with a field? I have a custom entity "referral" which is available for views:

function mymodule_entity_info() {
  return array(
    'referral' =&gt; array(
      'label' =&gt; t('Referral'),
      'controller class' =&gt; 'EntityAPIController',
      'views controller class' =&gt; 'EntityDefaultViewsController',
      ...
    ),
  );
}


The mymodule_referral table has a field referred_at which is a timestamp (stored as an int); I'd like to add a filter on this field to my view. I've got it displaying and filtering correctly with hook_views_data_alter and views_handler_*_date, but I'd prefer popup date selectors.

I understand that the date_views submodule of date should do what I want, but I can't find proper documentation on how to use it.

function mymodule_views_data_alter(&amp;$data) {
  ...
  $data['mymodule_referral']['referred_at']['filter'] = array(
    'real field' =&gt; 'referred_at',
    'handler' =&gt; 'date_views_filter_handler',
  );
}


doesn't seem to be sufficient, because it displays in the view edit page as

FILTER CRITERIA

    Referral: Referred_at (Missing date fields!) | Settings


If I open the settings there's a compulsory field

DATE FIELD(S) *
Select date field(s) to filter.


with no options to select.

The only reference I can find to the "Missing date fields!" error message talks about hook_date_api_fields, but that hook doesn't seem to exist in 7.

What configuration am I missing?
In addition to mapping 'handler' to 'date_views_filter_handler' you need to tell date_views that the field is a date:

function mymodule_views_data_alter(&amp;$data) {
  ...
  $data['mymodule_referral']['referred_at']['filter'] = array(
    'handler' =&gt; 'date_views_filter_handler',
    'is date' =&gt; TRUE,
  );
}


In the filter settings for referred_at you will now see referred_at as an option for "DATE FIELD(S)", and if you select it then it will work as expected.