2

在日期范围过滤器中设置默认值不是问题,而是备忘单

class ProductAdmin extends Admin
{

    //....

    public function getFilterParameters()
    {
        $this->datagridValues = array_merge(
            array(
                'updatedAt' => array(
                    'type' => 1,
                    'value' => array(
                        'start' => array(
                            'day' => date('j'),
                            'month' => date('m'),
                            'year' => date('Y')
                            ),
                        'end' => array(
                            'day' => date('j'),
                            'month' => date('m'),
                            'year' => date('Y')
                            )
                        ),
                    )
                ),
            $this->datagridValues
            );

        return parent::getFilterParameters();
    }

我在文档中没有找到任何东西...

我希望这能帮到您

4

0 回答 0