Forums Forums Search & Filter Pro SFpro with ACFpro (date pickers)

Viewing 2 posts - 1 through 2 (of 2 total)
  • Anonymous
    #95933

    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

    Trevor
    #95934

    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.

Viewing 2 posts - 1 through 2 (of 2 total)