{"action":"created","issue":{"url":"https://api.github.com/repos/kartik-v/yii2-widget-datepicker/issues/112","repository_url":"https://api.github.com/repos/kartik-v/yii2-widget-datepicker","labels_url":"https://api.github.com/repos/kartik-v/yii2-widget-datepicker/issues/112/labels{/name}","comments_url":"https://api.github.com/repos/kartik-v/yii2-widget-datepicker/issues/112/comments","events_url":"https://api.github.com/repos/kartik-v/yii2-widget-datepicker/issues/112/events","html_url":"https://github.com/kartik-v/yii2-widget-datepicker/issues/112","id":175524068,"number":112,"title":"Default value don't work in kartik datapicker dymanic form","user":{"login":"salman67","id":17249059,"avatar_url":"https://avatars.githubusercontent.com/u/17249059?v=3","gravatar_id":"","url":"https://api.github.com/users/salman67","html_url":"https://github.com/salman67","followers_url":"https://api.github.com/users/salman67/followers","following_url":"https://api.github.com/users/salman67/following{/other_user}","gists_url":"https://api.github.com/users/salman67/gists{/gist_id}","starred_url":"https://api.github.com/users/salman67/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/salman67/subscriptions","organizations_url":"https://api.github.com/users/salman67/orgs","repos_url":"https://api.github.com/users/salman67/repos","events_url":"https://api.github.com/users/salman67/events{/privacy}","received_events_url":"https://api.github.com/users/salman67/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-09-07T14:53:53Z","updated_at":"2016-09-23T09:28:33Z","closed_at":null,"body":"Hi @kartik-v \r\nThe default value in the kartik datepicker is not working in dynamic form after it is reinitialize(After the new form is added),\r\nThis is for Date-of-birth, the date of birth i want to start form 23-02-1982..\r\n\r\n \r\n  <?= $form->field($dir, \"[{$index}]owner_dob\")->widget(DatePicker::classname(), [                                  \"options\" => [\"placeholder\" => \"Date of Birth\",\r\n                        \"value\" => \"23-02-1982\",],\r\n                        \"id\" => \"dating\",\r\n                        \"type\" => DatePicker::TYPE_COMPONENT_APPEND,\r\n                        \"pluginOptions\" => [\r\n                          \"format\" => \"dd-mm-yyyy\",\r\n                        \"endDate\" => date(\"d-m-Y\"),\r\n                        \"autoclose\"=>true,\r\n                        ]])->label(false);?>  \r\n\r\nIm using wbraganca\\dynamicform\\DynamicFormWidget, for dynamic form. all fields are coming properly except this datepicker.\r\nAfter i reinitialize i get blank field, and the starting date is today's date. \r\n\r\nThis is the js code im using for reinitialize..\r\n$this->registerJs(<<<JS\r\n    $(\".dynamicform_wrapper\").on('afterInsert', function(e, item) {\r\n        var datePickers = $(this).find('[data-krajee-kvdatepicker]');\r\n        datePickers.each(function(index, el) {\r\n            $(this).parent().removeData().kvDatepicker('add');\r\n            $(this).parent().kvDatepicker(eval($(this).attr('data-krajee-kvdatepicker')));\r\n        });\r\n    });\r\nJS\r\n, \\yii\\web\\View::POS_END);\r\n\r\nReinitialize is happening but its coming blank fields and showing current date.\r\n "},"comment":{"url":"https://api.github.com/repos/kartik-v/yii2-widget-datepicker/issues/comments/249145599","html_url":"https://github.com/kartik-v/yii2-widget-datepicker/issues/112#issuecomment-249145599","issue_url":"https://api.github.com/repos/kartik-v/yii2-widget-datepicker/issues/112","id":249145599,"user":{"login":"Flashwade1990","id":10601583,"avatar_url":"https://avatars.githubusercontent.com/u/10601583?v=3","gravatar_id":"","url":"https://api.github.com/users/Flashwade1990","html_url":"https://github.com/Flashwade1990","followers_url":"https://api.github.com/users/Flashwade1990/followers","following_url":"https://api.github.com/users/Flashwade1990/following{/other_user}","gists_url":"https://api.github.com/users/Flashwade1990/gists{/gist_id}","starred_url":"https://api.github.com/users/Flashwade1990/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Flashwade1990/subscriptions","organizations_url":"https://api.github.com/users/Flashwade1990/orgs","repos_url":"https://api.github.com/users/Flashwade1990/repos","events_url":"https://api.github.com/users/Flashwade1990/events{/privacy}","received_events_url":"https://api.github.com/users/Flashwade1990/received_events","type":"User","site_admin":false},"created_at":"2016-09-23T09:28:33Z","updated_at":"2016-09-23T09:28:33Z","body":"You should add this line into your js script, not in php."}}
{"actor":{"display_login":"Flashwade1990"}}