How to add a date range picker to filter for dates on a GridView for Yii2

please i need help … can any one give me example for date range how it works … i searched many days i didn’t find answer :

this is what i found :

if(!empty($this->date) && strpos($this->date, '-') !== false) {

            list($start_date, $end_date) = explode(' - ', $this->date);

            $query->andFilterWhere(['between', 'date', strtotime($start_date), strtotime($end_date)]);


But it givis me messege is :