Skip Navigation

[Resolved] Datepicker not affecting filter results

This thread is resolved. Here is a description of the problem and solution.

Problem:

Add date field filter in a Views custom search form.

Solution:

You can follow our document to setup the date field filter:

Relevant Documentation:

https://toolset.com/documentation/user-guides/date-filters/

This support ticket is created 5 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 4 replies, has 2 voices.

Last updated by Michelle Dodd 5 years, 4 months ago.

Assisted by: Luo Yang.

Author
Posts
#1143241

Hi there, this is a continuation of this thread, where I asked how to change the dates shown in the datepicker:
https://toolset.com/forums/topic/how-to-extend-range-of-datepicker-in-filters/#post-1142511

It looks like this isn't working to show results of the search/filter previous to ten years ago. Maybe I was in such a hurry with everything else I was doing at the time I didn't test thoroughly, but I am pretty sure it was working. Here's the page on our dev server:

hidden link ( password: Wild! )

If you search for press releases in a date range prior to 2008 (the default start range of the date picker before I changed it) there are no results, even though we have many of them. The datepicker shows the correct range of years available to search, but only works when searching within the last ten years.

I can give you the admin login if that would help to see how I have these filters set up. I put the code you gave me in the JS tab of the editor.

Thanks,
Michelle

#1143667
date-picker-filter.JPG

Dear Michelle,

Thanks for the details, I can login your website, but don't see similar problem as you mentioned above:
there are no results

see screenshot: date-picker-filter.JPG

I can see some search results prior to 2008

Is there any missing steps or is this problem resolved?

#1143920
Screen Shot 2018-11-09 at 9.32.12 AM.png

I find that with some date searches it works, but with others it doesn't. For instance, when searching 1/1/00 to 5/31/00 I get results, but when searching 1/1/00 to 7/31/03 it doesn't. There are definitely press releases during that time.

I can't figure out why this would happen. The client has been testing as well and what we're finding is that with multi-year searches from the early years, it often doesn't find results.

Thanks,
Michelle

#1144807
date-filter.JPG

Thanks for the details, I have done below modification in your website:
Edit the wordpress archive view:
hidden link
in section "Query Filter", edit the date field "Release Date" filter, change the option "The field Release Date is a string", to:
The field Release Date is a number, see screenshot date-filter.JPG

Please test again, check if it is fixed.

More help:
https://toolset.com/documentation/user-guides/date-filters/

#1145965

That must have been the issue - all testing shows results now. Thank you so much for your help!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.