Отображение календаря с помощью виджета

This commit is contained in:
maxim
2021-09-10 18:21:23 +03:00
parent de47ccec77
commit bee3921de0
2 changed files with 113 additions and 20 deletions

View File

@ -35,10 +35,7 @@ class AjaxController extends \yii\web\Controller
$response = Yii::$app->response;
$response->format = Response::FORMAT_JSON;
$response->getHeaders()->set('Content-Type', 'application/json; charset=utf-8');
$response->content = json_encode(array_merge(
['reports' => $reports_array],
['month' => (array)new Month($year.'-'.$month.'-01')])
);
$response->content = json_encode($reports_array);
return $response;
}