I am trying to: create a view to select listings between two dates. I started with the classifieds framework site, then added a "start date" and "end date" (type DATE). I modified the "Listings on a map" view to select a date, and configured the date selection as follows:
Select items with field:
Start Date is a DATE greater than or equal URL_PARAM(wpv-wpcf-start-date)
AND
End Date is a DATE lower than or equal URL_PARAM(wpv-wpcf-start-date)
Link to a page where the issue can be seen:
The filter itself looks like this:
<div class="form-group">
<label>[wpml-string context="wpv-views"]Target Date[/wpml-string]</label>
[wpv-control-postmeta field="wpcf-start-date" type="date" default_date="today()" url_param="wpv-wpcf-start-date"]
</div>
I expected to see: Visiting the "Listings on a map" page, I excepted to be able to select a date within the listing date range (June 8 to June 10).
Instead, I got: nothing. I see the two listings if I delete the "target date", but any other date selection fails to display either listing.
You should use a NUMBER option instead:
https://toolset.com/documentation/user-guides/date-filters/
This is because of the Date Fields of Toolset return in fact numbers (timestamps).
It's explained here as well: https://toolset.com/documentation/user-guides/date-filters/
Also, your filter misses the second (end date) input.
Please create the filters only using the GUI, not altering them manually if possible. That should insert a begin and an end date selector for the date filter in the search and pagination section of the View.
Also, a Filter that does filter by date either greater or lower than today will simply show all posts, it would not make sense to have such filter - once triggered it'll just display the same posts as without filter.
I think you want to filter between a start and an end date, pickable by the user on the front end?
Then I'd suggest deleting the current Query Filter and HTML Front end filter, save the view, and after reloading it, insert the Filter in the Search and Pagination section with the "New Filter" button
There choose your date field you want to use, and then choose to filter "Between" - that will automatically produce all options as required
My issue is resolved now. Thank you!