From 3c5b025ac369c99df9ed0c83fefaac436e13b33c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Fri, 14 Aug 2015 22:57:16 +0200 Subject: filter by creation date --- src/Wallabag/CoreBundle/Filter/EntryFilterType.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/Wallabag/CoreBundle/Filter/EntryFilterType.php b/src/Wallabag/CoreBundle/Filter/EntryFilterType.php index 636ba324..2fa2f8a0 100644 --- a/src/Wallabag/CoreBundle/Filter/EntryFilterType.php +++ b/src/Wallabag/CoreBundle/Filter/EntryFilterType.php @@ -10,7 +10,21 @@ class EntryFilterType extends AbstractType { public function buildForm(FormBuilderInterface $builder, array $options) { - $builder->add('readingTime', 'filter_number_range'); + $builder + ->add('readingTime', 'filter_number_range') + ->add('createdAt', 'filter_date_range', array( + 'left_date_options' => array( + 'attr' => array( + 'placeholder' => 'dd/mm/yyyy'), + 'format' => 'dd/MM/yyyy', + 'widget' => 'single_text' + ), + 'right_date_options' => array( + 'attr' => array( + 'placeholder' => 'dd/mm/yyyy'), + 'format' => 'dd/MM/yyyy', + 'widget' => 'single_text' + ))); } public function getName() -- cgit v1.2.3