How can I change the data in the columns to the GridView using the DatePicker?

Hello, you need to be able to different strings to set the date in the table in calendar format. I wrote my code but it only changes the first row in the column, and after a page refresh resets it. Here is the code:

['date_subscription', 'default', 'value' => null],
 ['date_subscription', 'date_subscription', 'timestampAttribute' => 'date_subscription'],

public $date;

 public function rules()
 return [
[['date_subscription'], 'safe'],
['date_subscription', 'default', 'value' => null],


 if ($this->date !== null) {
 $date = strtotime($this->date);
 $query->andFilterWhere(['between', 'date_subscription', $date, $date + 3600 * 24]);


'label' => 'date of subscription',
 'attribute' => 'date_subscription',
 'value' => function ($model, $key, $value) {
 return \yii\jui\DatePicker::widget([
 'attribute' => 'date_subscription',
 'model' => $model,
 'format' => 'raw',
March 19th 20 at 08:48
0 answer

Find more questions by tags Yii