Forums Forums Search & Filter Pro Date Range

Tagged: ,

Viewing 5 posts - 1 through 5 (of 5 total)
  • Ross Moderator
    #26009

    Hey Kostas

    I added in the functionality to compare between 2 date fields for start/end – however I overlooked this kind of setup – I had another user I was working with on this mention it too, that she requires the same functionality you describe – so I’m looking to add it in soon.

    Most of the hard work has been done by allowing a second meta key to be used for the end date – its now getting this query just right.

    Thanks

    Anonymous
    #26018

    Ok, thanks Ross, I’m waiting for this feature.

    Anonymous
    #26041

    I’m also looking for this feature but with ‘date range’ or ‘individual days’. I have made a lot of pages with this feature. For performances, classes, theater… many times are date range (all days) but other times are certain days.

    Then I have ACF with:

    – Date range: ‘start date’ and ‘end date’
    – Individual days: repeater with ‘days’

    And a radio button to select between ‘date range’ or ‘individual days’.

    1

    2

    And I’m using this SQL query:

    ....
         (
            ( $wpdb->postmeta.meta_key = 'date_start' AND CAST($wpdb->postmeta.meta_value AS DATE) BETWEEN '".$date_start."' AND '".$date_end."' ) 
            OR ( $wpdb->postmeta.meta_key = 'date_end' AND CAST($wpdb->postmeta.meta_value AS DATE) BETWEEN '".$date_start."' AND '".$date_end."' ) 
         )           
         OR ( 
            ( $wpdb->postmeta.meta_key = 'date_start' AND CAST($wpdb->postmeta.meta_value AS DATE) <= '".$date_start."' ) 
              AND 
            ( mt1.meta_key = 'date_start' AND CAST(mt1.meta_value AS DATE) >= '".$date_end."' ) 
         )
         OR ( $wpdb->postmeta.meta_key LIKE 'individual_days_%_day' AND CAST($wpdb->postmeta.meta_value AS DATE) BETWEEN '".$date_start."' AND '".$date_end."' ) 
         )";
    Anonymous
    #30560

    Hi Ross, is there any progress with this feature?

    Thanks
    Kostas

    Ross Moderator
    #30748

    Hey Kostas

    Please try the update I just sent 🙂

    There is a new compare option for your range fields.

    Let me know if it makes sense, or you have any suggestions as to the wording of this new option (I think its a little confusing).

    Thanks

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