Link to date_query results in WordPress

You can use $_GET to get the query string values and then pass it in the $args to create a dynamic WP_Query

$after = $_GET['after'];
$before = $_GET['before'];

and then in the $args

if ($after && $before) {
    $args = array(
        'date_query' => array(
            array(
                'after'     => $after,
                'before'    => $before,
                'inclusive' => true,
            ),
        ),
    );
} else {
    // default args
}
$query = new WP_Query( $args );