diff options
author | Kevin Decherf <kevin@kdecherf.com> | 2020-03-21 21:11:01 +0100 |
---|---|---|
committer | Kevin Decherf <kevin@kdecherf.com> | 2020-03-22 17:01:39 +0100 |
commit | 8ee7b1603d23297a6c183105f79b1290ce9828bf (patch) | |
tree | 15718b08724227f379a8af69c1a6a7ed8ab6c870 /src/Wallabag | |
parent | ef81e3c89b00712476b0698e7c9057fc05a2e1c9 (diff) | |
download | wallabag-8ee7b1603d23297a6c183105f79b1290ce9828bf.tar.gz wallabag-8ee7b1603d23297a6c183105f79b1290ce9828bf.tar.zst wallabag-8ee7b1603d23297a6c183105f79b1290ce9828bf.zip |
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>
Diffstat (limited to 'src/Wallabag')
-rw-r--r-- | src/Wallabag/CoreBundle/Entity/Entry.php | 2 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php index 19045798..0e19a0c2 100644 --- a/src/Wallabag/CoreBundle/Entity/Entry.php +++ b/src/Wallabag/CoreBundle/Entity/Entry.php | |||
@@ -552,7 +552,7 @@ class Entry | |||
552 | * | 552 | * |
553 | * @return Entry | 553 | * @return Entry |
554 | */ | 554 | */ |
555 | public function setCreatedAt(\DateTime $createdAt) | 555 | public function setCreatedAt(\DateTimeInterface $createdAt) |
556 | { | 556 | { |
557 | $this->createdAt = $createdAt; | 557 | $this->createdAt = $createdAt; |
558 | 558 | ||
diff --git a/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php b/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php index 365804dd..61ad99a8 100644 --- a/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php +++ b/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php | |||
@@ -75,16 +75,16 @@ class EntryFilterType extends AbstractType | |||
75 | ->add('createdAt', DateRangeFilterType::class, [ | 75 | ->add('createdAt', DateRangeFilterType::class, [ |
76 | 'left_date_options' => [ | 76 | 'left_date_options' => [ |
77 | 'attr' => [ | 77 | 'attr' => [ |
78 | 'placeholder' => 'dd/mm/yyyy', | 78 | 'placeholder' => 'yyyy-mm-dd', |
79 | ], | 79 | ], |
80 | 'format' => 'dd/MM/yyyy', | 80 | 'format' => 'yyyy-MM-dd', |
81 | 'widget' => 'single_text', | 81 | 'widget' => 'single_text', |
82 | ], | 82 | ], |
83 | 'right_date_options' => [ | 83 | 'right_date_options' => [ |
84 | 'attr' => [ | 84 | 'attr' => [ |
85 | 'placeholder' => 'dd/mm/yyyy', | 85 | 'placeholder' => 'yyyy-mm-dd', |
86 | ], | 86 | ], |
87 | 'format' => 'dd/MM/yyyy', | 87 | 'format' => 'yyyy-MM-dd', |
88 | 'widget' => 'single_text', | 88 | 'widget' => 'single_text', |
89 | ], | 89 | ], |
90 | 'label' => 'entry.filters.created_at.label', | 90 | 'label' => 'entry.filters.created_at.label', |