In a views exposed filter form, we can set a date field as a date_popup field. When we do it, the date format into the field, after picking up a date in the calendar, is always displayed in the "Y-m-d" format. We can't set it as the defaut date format.

the source of the bug is in the line 319 in the current dev release :

$format = $this->date_handler->views_formats($this->options['granularity'], 'sql');

As we can see, the forat is set as the "sql" one but we want the "display" format in this case.

I suggest to change it like this :

$format = $this->date_handler->views_formats($this->options['granularity'], 'display');

It seems to work well.

Comments

mustanggb’s picture

Status: Active » Closed (duplicate)

Unfortunately 'display' is not always correct.

Duplicate of #1409120: Date format in views exposed filter does not respect configured format