I'm not sure if this is intended functionality, but I imagine it's not. If i add a start/end date filter to a view, expose it to visitors, and set a default value for the start date as a relative value (now), the default value is filled in in the form field, but the results do not honor this filter. they DO honor the filter when the form is submitted. Is this intentional or a bug?

Any help is greatly appreciated.

-Jordan

Comments

jcary85’s picture

I've discovered the issue with this, although I'm again not sure this is intentional functionality.

If I set a default date for the END date as well (some time in the future), the filter works by default.

So, this means that no value for the end date implies we should not use the filter. Is this intentional? I'd think if you're filtering "between" and you leave the upper limit blank, it should still filter using the start date, no?

FYI - this is using the "between" operator in views.

karens’s picture

Status: Active » Postponed (maintainer needs more info)

Not enough information to tell what you are talking about. There are lots of different kinds of fields and lots of different settings for the filters. You need to provide steps that tell me exactly what you're trying to do.

jcary85’s picture

Sorry about that. Here's my exact setup:

I've created a custom content type. It has a date field I've created using the Date module. The field has a start and end date, and uses year, month, day.

I've created a view that displays a list of this content type. I've created an exposed filter on the date field. The filter uses the "between" operator and uses the pop-up calendar to choose dates.

Specifying JUST a start date or JUST an end date does nothing. The filter is not honored at all unless both start and end date are filled in. This seems counter intuitive and I'm not sure it's intentional.

I'm not sure if this has any effect (it shouldn't), but I'm using an exposed form.

karens’s picture

The between filter assumes you have two dates that you want to between on. It doesn't make any sense if one of them is missing. I wouldn't call that a bug report, that is what I expect. What did you think it would do?

jcary85’s picture

Thanks for the quick response. I am sorry to have wasted your time. It all just clicked when you wrote this. I guess the correct way to handle a start and end date filter that allows empty start or end date would be to simply include two separate filters.

Thanks again for the response. Great module BTW.

arlinsandbulte’s picture

Status: Postponed (maintainer needs more info) » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.