I'm trying to filter a view on a date field not being empty, but it seems there is no is empty operator.
Looking into it the date filter seems to inherit the numeric operators but adds value type radiobuttons.

Is there any way to add the is empty operator and then disable the type selection?
An alternative would be to allow a empty value field. That in combination with the Is equal to operator might do the trick.

Just to be clear I'm talking about the core date field, not a field of the Date module.

CommentFileSizeAuthor
#1 1901932.patch1.42 KBmonish_deb

Comments

monish_deb’s picture

StatusFileSize
new1.42 KB

I have gone through your requirement, which can be achievable via code work. Apply my patch to have two operator "Is empty(NULL)" and "Is not empty(NOT NULL)" for Date filter forcibly.

What I have found out that not any single core date field in Drupal support empty (Is NULL), reason why those two operator were not visible in Date filter which are constrained in parent filter "views_handler_filter_numeric.inc" at Line:82 in operator() function.

peteruithoven’s picture

Did anybody have a look at this patch, to see if it could be implemented?

peteruithoven’s picture

Patch works for me. Thanks monish_deb!