Support

Search results for ""

Sorry, no results found. Perhaps you would like to search the documentation?
All Topics
Shae

Custom filtering current date.

Is there a way to save a segment with the filter being Date is after (current date) instead of actually choosing a date?

I have a CPT for Events. I would like a segment to be able to show only future events in the order of next upcoming events.

3 years, 4 months ago
Tobias
Developer

Currently, there is no such option, but I see why a “future/past” date condition would be useful. I think it would make sense for a date to have two extra options: past and future dates, especially in combination with segments.

Thanks for the input, I will look into it a bit further and see if we can ship this in an upcoming release.

Cheers, Tobias

3 years, 4 months ago
Philippe

Did this feature ever make it into ACP?
Thanks, Phil

4 months, 2 weeks ago
Stefan
Developer

Yes, many of our date columns do have the future and past date filters. Even filters like x days ago and today are operators that are available for the date columns. This is a feature in our Smart Filtering feature, not the filter feature with the default drop downs on the table.

4 months, 2 weeks ago
Shae

Hey @stefan This doesn’t seem to be the cast for ACF Date fields. Is there any want to set a default smart filter based on ACF date field?

4 months, 1 week ago
Stefan
Developer

@Shae
You’re right, this is currently not implemented for both the ACF Date and Date-Time fields.
For the Date Time fields, there is a simple workaround that works by changing the following file:

ac-addon-acf/classes/Fields/DateTimePicker.php

The search method should become this:

public function search() {
	return new ACP\Search\Comparison\Meta\DateTime\ISO( $this->get_meta_key(), $this->get_meta_type() );
}

It will be patched in the next version. We’ll have another look at the date field since this must be written specifically for the ‘uncommon’ ACF date format.

4 months ago

You must be logged in to reply to this topic.