symfony2admingenerator / FormExtensionsBundle

Symfony2 form extensions for Admingenerator project (also working standalone!)
Other
13 stars 13 forks source link

Add `s2a_daterange_picker` type #22

Closed ioleo closed 9 years ago

ioleo commented 9 years ago

Based on dangrossman/bootstrap-daterangepicker widget.

ioleo commented 9 years ago

Probably forgot about some details ;) Time to test...

ksn135 commented 9 years ago

@loostro You've forgot to mention, that we needs to modify filterDate function in ListController to make s2a_daterange_picker filter works as expected:

class ListController extends BaseListController
{
    protected function filterDate($queryFilter, $value)
    {
        list($from, $to) = explode(' - ', $value);
        $queryFilter->addDateFilter('date', ['from' => $from, 'to' => $to]);
    }
}