{"action":"closed","issue":{"url":"https://api.github.com/repos/yiisoft/yii2/issues/9798","labels_url":"https://api.github.com/repos/yiisoft/yii2/issues/9798/labels{/name}","comments_url":"https://api.github.com/repos/yiisoft/yii2/issues/9798/comments","events_url":"https://api.github.com/repos/yiisoft/yii2/issues/9798/events","html_url":"https://github.com/yiisoft/yii2/issues/9798","id":108966090,"number":9798,"title":"Datepicker does not work when generated dynamically","user":{"login":"alemedinam","id":8710066,"avatar_url":"https://avatars.githubusercontent.com/u/8710066?v=3","gravatar_id":"","url":"https://api.github.com/users/alemedinam","html_url":"https://github.com/alemedinam","followers_url":"https://api.github.com/users/alemedinam/followers","following_url":"https://api.github.com/users/alemedinam/following{/other_user}","gists_url":"https://api.github.com/users/alemedinam/gists{/gist_id}","starred_url":"https://api.github.com/users/alemedinam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alemedinam/subscriptions","organizations_url":"https://api.github.com/users/alemedinam/orgs","repos_url":"https://api.github.com/users/alemedinam/repos","events_url":"https://api.github.com/users/alemedinam/events{/privacy}","received_events_url":"https://api.github.com/users/alemedinam/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/yiisoft/yii2/labels/ext:jui","name":"ext:jui","color":"bfd4f2"},{"url":"https://api.github.com/repos/yiisoft/yii2/labels/status:to%20be%20verified","name":"status:to be verified","color":"fbca04"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/yiisoft/yii2/milestones/9","html_url":"https://github.com/yiisoft/yii2/milestones/2.0.x","labels_url":"https://api.github.com/repos/yiisoft/yii2/milestones/9/labels","id":831720,"number":9,"title":"2.0.x","description":"","creator":{"login":"cebe","id":189796,"avatar_url":"https://avatars.githubusercontent.com/u/189796?v=3","gravatar_id":"","url":"https://api.github.com/users/cebe","html_url":"https://github.com/cebe","followers_url":"https://api.github.com/users/cebe/followers","following_url":"https://api.github.com/users/cebe/following{/other_user}","gists_url":"https://api.github.com/users/cebe/gists{/gist_id}","starred_url":"https://api.github.com/users/cebe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cebe/subscriptions","organizations_url":"https://api.github.com/users/cebe/orgs","repos_url":"https://api.github.com/users/cebe/repos","events_url":"https://api.github.com/users/cebe/events{/privacy}","received_events_url":"https://api.github.com/users/cebe/received_events","type":"User","site_admin":false},"open_issues":416,"closed_issues":2,"state":"open","created_at":"2014-10-19T13:49:45Z","updated_at":"2015-09-30T10:53:29Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2015-09-29T21:42:29Z","updated_at":"2015-09-30T10:53:29Z","closed_at":"2015-09-30T10:53:29Z","body":"Well my code bellow works without problem. \r\n\r\n```php\r\nuse yii\\jui\\DatePicker;\r\n\r\n<div class=\"box box-solid\">\r\n        <div class=\"box-header with-border\">\r\n            <i class=\"fa fa-group\"></i>\r\n            <h3 class=\"box-title\">Grupos</h3>\r\n        </div>\r\n        <div class=\"box-body\">\r\n            <dl class=\"dl-horizontal\">\r\n                <?php foreach ($listaGrupos as $grupo): ?>\r\n                    <dt><?= Html::encode($grupo) ?></dt>\r\n                    <dd><div class=\"input-group\">\r\n                            <div class=\"input-group-addon\">\r\n                            <i class=\"fa fa-calendar\"></i>\r\n                            </div>\r\n                                <?= DatePicker::widget([\r\n                                    'id' => 'evaluacion-fechaprogramada-'.trim($grupo), \r\n                                    'name'  => 'Evaluacion[FechaProgramada]['.trim($grupo).']',\r\n        //                            'value'  => $value,\r\n                                    'language' => 'es',\r\n                                    'dateFormat' => 'dd/MM/yyyy',\r\n                                    'clientOptions' => [\r\n                                        'changeMonth' => true,\r\n                                        'changeYear' => true,\r\n                                        'showAnim' => 'slideDown',\r\n                                        'showOtherMonths' => true,\r\n                                        'selectOtherMonths' => true,\r\n                                        'minDate' => $modelCronograma->InicioGestionReal, \r\n                                        'maxDate' => $modelCronograma->FinalGestionReal,\r\n                                    ],\r\n                                ]); ?>\r\n                        </div>\r\n                    </dd>\r\n                <?php endforeach; ?>\r\n            </dl>\r\n        </div>    \r\n    </div>\r\n```\r\n\r\nWhen I add options, more specifically class, it does not show the datepicker\r\n```php\r\n 'options' => [\r\n              'class' => 'hasDatepicker form-control',\r\n],\r\n```\r\n\r\n\r\nLinux mint 17.2\r\nYii 2.0.6\r\nxampp 1.8.1\r\n\r\n"}}