wbraganca / yii2-dynamicform

It is widget to yii2 framework to clone form elements in a nested manner, maintaining accessibility.
Other
436 stars 439 forks source link

Plugin options of kartik datepicker do not work #279

Closed vitalypark0555 closed 5 years ago

vitalypark0555 commented 5 years ago

I set plugin options, however this datepicker in the dynamic form doesn't get changed at all. Autoclose is not working after selecting a date as well as format being dd/mm/yyyy by default. How can I solve this problem? Thanks beforehand.

                                                    <?= $form->field($modelEduForm, "[{$index}]start_date")->widget(DatePicker::classname(), [
                                                        'options' => ['placeholder' => 'From'],
                                                        'pluginOptions' => [
                                                            'autoclose' => true,
                                                            'format' => 'dd-MM-yyyy'
                                                        ]
                                                    ]); ?>
vitalypark0555 commented 5 years ago

Magically solved the problem. Whether the format of string helped or smth else.