filter by creation date

This commit is contained in:
Nicolas Lœuillet 2015-08-14 22:57:16 +02:00
parent 925d8ab316
commit 3c5b025ac3

View 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()