How can I use "date_views_filter_handler" defined in date module as filter handler for a column of integer type on custom table while exposing it to views.

1 Answer 1


I will not say this answer the question I asked but must say this answer worked the way I want.

Instead of using "date_views_filter_handler" I used "date_views_filter_handler_simple" and it just worked like a charm.Here is what I did while exposing my custom table to views.

  $data['jh_report']['date_of_purchase'] = array(
    'title' => t('Date of purchase'),
    'help' => t('Date of last purchase for current month'),
    'field' => array(
      'handler' => 'views_handler_field_date',
      'click sortable' => TRUE,
    'sort' => array(
      'handler' => 'views_handler_sort_date',
    'filter' => array(
      'handler' => 'date_views_filter_handler_simple',

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.