How to change date format in date search


Ive tried accessing the functions.php and add in the following code to change the date format for searches with the following but it doesn’t work:

// Add a filter to change the date format in the search form.

add_filter( 'hivepress/v1/templates/listing_search_form', function( $template ) {
    if ( isset( $template['blocks']['fields']['date'] ) ) {
        $template['blocks']['fields']['date']['format'] = 'd/m/Y';
    return $template;
} );


You can change the date format in WP Dashboard > Settings > General.

P.S. If you purchased a theme or extension, please enter the license key in the forum profile settings, this will enable the Premium Support badge and ensure a 24-hour turnaround time.