configure a date range filter in SonataAdminBundle

Sonata admin documentation is incomplete since its first version i guess. Today I’m looking for a date range picker in filter and cant find a proper doc with the date picker for Symfony 4.

By hit and trial and after searching for a while got the solution.

->add('created', 'doctrine_orm_datetime_range', ['field_type'=> DateTimeRangePickerType::class])

Leave a Reply

Your email address will not be published. Required fields are marked *