Include custom field in Date Views Filter

Created on 9 March 2009, over 15 years ago
Updated 3 December 2023, 12 months ago

Can you give me some more detail on how to include a custom DateTime field in the list of Dates that appear in the Views "Date" Filter?

I see a comment at Line 52 in date_api_fields.inc which seems to address the issue:

    // Custom fields should use the 'views_handler_field_date' handler and
    // return an array like array('sql_type' => DATE_ISO, 'tz_handling' => 'site');
    // when the hook is called with their table.field_name.

But I am not clear how or when to use the handler mentioned, or which hook is being referred to. Could you give a little more detail, and/or point to a simple example?

Many thanks,
Tony.

💬 Support request
Status

Fixed

Version

2.0

Component

Date API

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024