mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 15:03:25 +00:00
Fix #752 date search
This commit is contained in:
@@ -356,7 +356,7 @@ class searchEngine_options implements Serializable
|
||||
public function set_min_date($min_date)
|
||||
{
|
||||
if ( ! is_null($min_date) && trim($min_date) !== '') {
|
||||
$this->date_min = DateTime::createFromFormat('d/m/Y H:i:s', $min_date . ' 00:00:00');
|
||||
$this->date_min = DateTime::createFromFormat('Y/m/d H:i:s', $min_date . ' 00:00:00');
|
||||
}
|
||||
|
||||
return $this;
|
||||
@@ -379,7 +379,7 @@ class searchEngine_options implements Serializable
|
||||
public function set_max_date($max_date)
|
||||
{
|
||||
if ( ! is_null($max_date) && trim($max_date) !== '') {
|
||||
$this->date_max = DateTime::createFromFormat('d/m/Y H:i:s', $max_date . ' 23:59:59');
|
||||
$this->date_max = DateTime::createFromFormat('Y/m/d H:i:s', $max_date . ' 23:59:59');
|
||||
}
|
||||
|
||||
return $this;
|
||||
|
@@ -445,7 +445,7 @@
|
||||
<select name="datefield" class="input-medium">
|
||||
{% for field_id, field in search_datas['dates'] %}
|
||||
<option onchange="checkFilters(true);"
|
||||
class="field_switch field_{{field['sbas']|implode(' field_')}}" value="{{field_id}}">{{field['fieldname']}}</option>
|
||||
class="field_switch field_{{field['sbas']|implode(' field_')}}" value="{{ field['fieldname'] }}">{{field['fieldname']}}</option>
|
||||
{% endfor %}
|
||||
<option value="{{search_datas['dates']|array_keys|implode('|')}}" selected="selected">
|
||||
{% trans 'rechercher dans tous les champs' %}
|
||||
|
Reference in New Issue
Block a user