- This topic has 1 reply, 2 voices, and was last updated 7 years, 8 months ago by .
These forums are now closed and remain for historical purposes.
None of the content applies to the new version 3. For support, get in touch via our contact form.
Forums › Forums › Search & Filter Pro › SFpro with ACFpro (date pickers)
Tagged: acf fro, date picker, match dates
Hello! how are you?
I am using the ACF Pro and Search & Filter Pro plugins. I have created a custom fields of type Date Selection with ACF. Concretely they are two fields. One of “start date” (of an event) and another of “end date” (of the same event). The problem I encounter is that I need a search field by date (selected a single date in the field) that I find all posts that in which the selected date is greater or equal to “start date” and less or equal To “finalization date”.
In other words: yoo I need to select a date that you look for within a range of dates (from acf, not date of publication).
Thank you very much!
A greeting!
Sorry for my english
The current plugin does not offer this option, but it can be done, with some coding. It requires that you add a date range search to the form and set that up to look within the range (from … to), and then use CSS to hide the To data entry field in the front end.
So far so good. Then, you need some custom javascript (jQuery) to add to the page with the form so that the js watches for changes with the From field, and copies the date over to the To field. It is not quite so easy because of the way the jQuery UI Datepicker works, as I am not sure what you need to look for as it inserts the date into the From field.
For V3 of our plugin (the next version, that we are now working on) this should be simpler to set up with this option in the single field search.
This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.
We also use cookies to store items in your cart as well as allowing your to login on the site.
You can adjust all of your cookie settings by navigating the tabs on the left hand side.
By continuing to use this site, you also agree to our Privacy Policy.
Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.
*Other cookies used for logging in and cart functions will only be used when you use those features and cannot be disabled.
If you disable these cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.
This website uses Google Analytics to collect anonymous information such as the number of visitors to the site, and the most popular pages.
Keeping this cookie enabled helps us to improve our website.
Please enable Strictly Necessary Cookies first so that we can save your preferences!
More information about our Cookie Policy