]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
filter by creation date 1343/head
authorNicolas Lœuillet <nicolas@loeuillet.org>
Fri, 14 Aug 2015 20:57:16 +0000 (22:57 +0200)
committerNicolas Lœuillet <nicolas@loeuillet.org>
Mon, 17 Aug 2015 13:54:49 +0000 (15:54 +0200)
src/Wallabag/CoreBundle/Filter/EntryFilterType.php

index 636ba3246e3a819fd8edc781704629b85d66f599..2fa2f8a08033beada4f9e36436e3373b45a68dc9 100644 (file)
@@ -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()