I just had a problem with the date field in an exposed filter in a Drupal view, using the “popup” form type. Regardless of the site configuration date format, the exposed filter will always default to the format Y-m-d. I ended up fixing this by creating a new module, and wrote a simple function using the form_alter hook:


function exposed_date_format_form_views_exposed_form_alter(&$form, &$form_state) {

    if ($form['#id'] == 'your exposed form ID') {


        $form['your date field name']['min']['#date_format'] = 'd-m-Y';
        $form['your date field name']['max']['#date_format'] = 'd-m-Y';
    }
}
« Back