Closed (fixed)
Project:
Date
Version:
7.x-2.0-rc2
Component:
Views Filter
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Feb 2012 at 14:31 UTC
Updated:
27 Feb 2012 at 20:50 UTC
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
Comment #1
jcary85 commentedI'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.
Comment #2
karens commentedNot 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.
Comment #3
jcary85 commentedSorry 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.
Comment #4
karens commentedThe 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?
Comment #5
jcary85 commentedThanks 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.
Comment #6
arlinsandbulte commented