Closed (duplicate)
Project:
Date
Version:
7.x-2.5
Component:
Date Popup
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Jun 2012 at 13:36 UTC
Updated:
14 Aug 2012 at 15:43 UTC
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
Comment #1
mustanggb commentedUnfortunately 'display' is not always correct.
Duplicate of #1409120: Date format in views exposed filter does not respect configured format