Yii Kartik error Date Rang or andFilterWhere. How to fix?

I use the widget it works, but when you ask your range goes NaN. What could be the error? Where to look?
5a2f7ffa13341193447360.png

If you remove from the string the search query, then everything works well. May be a bug in the UserSearch and andFilterWhere?
5a2f806f384c8278010945.png
[
 'attribute' => 'created_at',
 'format' => 'datetime',
 'filterOptions' => [
 'class' => 'date-range-grid'
],
 'filter' => DateRangePicker::widget(
[
 'model' => $searchModel,
 'attribute' => 'created_at',
 'convertFormat' => true,
 'presetDropdown' => true,
 'options' => [
 'class' => 'form-control',
],
 'pluginOptions' => [
 'format' => 'Y-m-d H:i:s',
 'dateLimit' => ['months' => 6],
 'opens' => 'left'
],
]
)
 ],


$query->andFilterWhere($this->getBetweenDatesFilterArray('created_at', ' - '))
 ->andFilterWhere($this->getBetweenDatesFilterArray('updated_at', ' - '))
 ->andFilterWhere(['LIKE', 'phone', $this->phone])
 ->andFilterWhere(['LIKE', 'email', $this->email])
 ->andFilterWhere(['LIKE', 'profile.name', $this->getAttribute('profile.name')])
 ->andFilterWhere(['LIKE', 'profile.surname', $this->getAttribute('profile.surname')])
 ->andFilterWhere(['LIKE', 'profile.middle_name', $this->getAttribute('profile.middle_name')]);


The query produces
June 10th 19 at 15:53
1 answer
June 10th 19 at 15:55
Solution
The dates are not in the right format. yyyy.mm.DD. And he works for DD.mm.yyyy
Most likely not the problem. At least in the official documentation, use the format 'Y-m-d' and I have changed nothing from the change of format - jacquelyn_Nikolaus84 commented on June 10th 19 at 15:58
But now I realized that the query andFilterWhere there is need to change the format up and running. Thank you) - jacquelyn_Nikolaus84 commented on June 10th 19 at 16:01
Only problem is that the format in the plugin is not working for some reason...) And directly in the line has changed and is working)) - jacquelyn_Nikolaus84 commented on June 10th 19 at 16:04
Not specified the correct format in the widget. The problem is still in the format. That's right 'locale'=>['format' => 'Y-m-d'], - jacquelyn_Nikolaus84 commented on June 10th 19 at 16:07
Please) - Courtney49 commented on June 10th 19 at 16:10

Find more questions by tags Yii