Thanks for your request.
At this moment, most of our date columns, including the ACF date column have the following filtering methods:
– Daily
– Monthly
– Yearly
– Future / Past
– Range
Another method that only displays for today is too specific so not really an options in my option.
But if you use the daily dropdown, you could use one of our filters to put alway a ‘Today’ option on top of the filter dropdown. You could use the following snippet in your own code to put the ‘Today’ option to the default dropdown.
/**
* Hide empty option from filter menu
*
* @param array $args
* @param AC_Column $column
*
* @return array
*/
function acp_filtering_show_today_date_label( $args, $column ) {
if ( $column instanceof ACA_ACF_Column && 'date_picker' === $column->get_acf_field_option( 'type' ) ) {
unset( $args['options'][ date( 'Ymd' ) ] );
$args['options'] = array_merge( array(
date( 'Ymd' ) => 'Today',
), $args['options'] );
}
return $args;
}
add_filter( 'acp/filtering/dropdown_args', 'acp_filtering_show_today_date_label', 10, 2 );