How to theme the views exposed form?
Theming Views' exposed form is hard because it doesn't behave like most forms and use its own label mechanism. So, you can't simply use a form_alter hook to add #prefix and #suffix to elements. But using THEME_preprocess_views_exposed_form, you can craft your own suffix/prefix mechanism:

function THEME_preprocess_views_exposed_form(&amp;$variables) {
  if ($variables['form']['#id'] == 'views-exposed-form-VIEWNAME-DISPLAYID') {
    foreach ($variables['widgets'] as $id =&gt; &amp;$widget) {
      switch ($id) {
        case 'first_date_id':
          $widget-&gt;prefix = '&lt;div class="date-widgets-wrapper"&gt;';
          break;
        case 'last_date_id':
          $widget-&gt;suffix = '&lt;/div&gt;';
          break;
      }
    }
  }
}


and in the template file

&lt;fieldset&gt;
    &lt;legend&gt;Filters&lt;/legend&gt;

    &lt;div class="views-exposed-form"&gt;
        &lt;div class="views-exposed-widgets clear-block"&gt;
            &lt;?php foreach($widgets as $id =&gt; $widget): ?&gt;
                &lt;?php if (!empty($widget-&gt;prefix)) print $widget-&gt;prefix; ?&gt;
                &lt;div class="views-exposed-widget"&gt;
                    &lt;?php if (!empty($widget-&gt;label)): ?&gt;
                        &lt;label for="&lt;?php print $widget-&gt;id; ?&gt;"&gt;
                            &lt;?php print $widget-&gt;label; ?&gt;
                        &lt;/label&gt;
                    &lt;?php endif; ?&gt;
                    &lt;?php if (!empty($widget-&gt;operator)): ?&gt;
                        &lt;div class="views-operator"&gt;
                            &lt;?php print $widget-&gt;operator; ?&gt;
                        &lt;/div&gt;
                    &lt;?php endif; ?&gt;
                    &lt;div class="views-widget"&gt;
                        &lt;?php print $widget-&gt;widget; ?&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
                &lt;?php if (!empty($widget-&gt;suffix)) print $widget-&gt;suffix; ?&gt;
            &lt;?php endforeach; ?&gt;
            &lt;div class="views-exposed-widget"&gt;
                &lt;?php print $button ?&gt;
            &lt;/div&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/fieldset&gt;