forked from wallabag/wallabag
Fix createdAt date range filter
- hiddenName has been disabled in order to fix the missing date range values when using the material theme - data format has been changed to 'Y-m-d' in order to comply with the browser date input default format - tests: date() and strtotime have been replaced with DateTime-related objects Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
This commit is contained in:
@ -552,7 +552,7 @@ class Entry
|
||||
*
|
||||
* @return Entry
|
||||
*/
|
||||
public function setCreatedAt(\DateTime $createdAt)
|
||||
public function setCreatedAt(\DateTimeInterface $createdAt)
|
||||
{
|
||||
$this->createdAt = $createdAt;
|
||||
|
||||
|
||||
@ -75,16 +75,16 @@ class EntryFilterType extends AbstractType
|
||||
->add('createdAt', DateRangeFilterType::class, [
|
||||
'left_date_options' => [
|
||||
'attr' => [
|
||||
'placeholder' => 'dd/mm/yyyy',
|
||||
'placeholder' => 'yyyy-mm-dd',
|
||||
],
|
||||
'format' => 'dd/MM/yyyy',
|
||||
'format' => 'yyyy-MM-dd',
|
||||
'widget' => 'single_text',
|
||||
],
|
||||
'right_date_options' => [
|
||||
'attr' => [
|
||||
'placeholder' => 'dd/mm/yyyy',
|
||||
'placeholder' => 'yyyy-mm-dd',
|
||||
],
|
||||
'format' => 'dd/MM/yyyy',
|
||||
'format' => 'yyyy-MM-dd',
|
||||
'widget' => 'single_text',
|
||||
],
|
||||
'label' => 'entry.filters.created_at.label',
|
||||
|
||||
Reference in New Issue
Block a user