diff --git a/CHANGELOG.txt b/CHANGELOG.txt index ad03e795f06cda5c4db4ec90cbd343c7185e1984..0dcd1f30446c7aea388fd690c3be258238be9cd0 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -5,6 +5,7 @@ Date Module 7.x Version 7.x-2.x-dev =================== +- Our test for whether this is a Date argument or filter needs to include a check that the field was actually processed by Date Views. Some dates are not. - Issue #1379172 by deviantpixel, Note that the Date Repeat form uses a function that was re-named in 7.8. - Store the locale format in a static cache to avoid re-computing it dozens of times on calendar views. - Sheesh. Fix syntax error in api.date.php. diff --git a/date_views/date_views.module b/date_views/date_views.module index 4734f58c508654d3caf773555e55a4aa768b0fd0..d5ae1c9f2399241c6738f2a2fe429153209f6f30 100644 --- a/date_views/date_views.module +++ b/date_views/date_views.module @@ -284,13 +284,17 @@ function date_views_form_views_ui_edit_form_alter(&$form, &$form_state) { * The instanceof function makes this work for any handler that was derived * from 'views_handler_filter_date' or 'views_handler_argument_date', * which includes core date fields like the node updated field. + * + * The test for $handler->min_date tells us that this is an argument that + * not only is derived from the views date handler but also has been processed + * by the Date Views filter or argument code. */ function date_views_handler_is_date($handler, $type = 'argument') { switch ($type) { case 'filter': - return $handler instanceof views_handler_filter_date; + return $handler instanceof views_handler_filter_date && !empty($handler->min_date); case 'argument': - return $handler instanceof views_handler_argument_date; + return $handler instanceof views_handler_argument_date && !empty($handler->min_date); } return FALSE; }