How do I alter the HTML outputted by an exposed filter? I have a view that pulls in content of many different types. I gave the user two exposed filters, using the Better Exposed Filters module. However, the two filters look different. I would like them to look the same.



Specifically, I would like to get rid of the "Start date", "End date", and "E.g., 2017-02-01" labels on the filter on the right hand side.

How do I do this? Is it possible to do it within the view settings? If not, I don't mind writing a custom solution. I imagine there's a relevant hook somewhere, but I do not know which one to use.
Turns out these settings can't be changed in the View (that I was able to find, and I looked pretty extensively). But, with Drupal's module/hook system, it's a pretty quick fix.

Source: How to remove format description in date_popup form field?

First, get rid of Start date and replace End date with And to match the filter on the left:

function edit_date_form_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  if ($form['#id'] === "views-exposed-form-editable-content-page") {
    $form["field_editor_review_date_value_1"]["min"]["#title"] = "";
    $form["field_editor_review_date_value_1"]["max"]["#title"] = "And";
  }
}


Then, get rid of the E.g., 2017-02-01:

function edit_date_form_date_popup_process_alter(&amp;$element, &amp;$form_state, $context) {
  $element['date']['#description'] = "";
  $element['time']['#description'] = "";
}


Plop those into a module, enable it, and your output is: