I'm using Yii2-advanced-app. I'm using some widgets like 'kartik\date\DatePicker', 'wbraganca\dynamicform\DynamicFormWidget'
in my project.
They are working well with my backend. But if I use the same code with frontend, they doesn't work. Suppose I clicked on date to choose one, it shows the datepicker(If I am using it with backend code), it looks like this:
but if I'm using the same on frontend side, it doesn't work. That is, nothing happens after clicking on datepicker in frontend.
Why it doesn't work? The same is happening with wbraganca dynamic form
.
Please note that I'm using a custom theme/template in my frontend.
My '_form.php' in backend is as follows -
use kartik\date\DatePicker;
<?= $form-> field($model, 'ven_established_date')->widget(DatePicker::classname(), [
'options' => ['placeholder' => 'Enter Established date...'],
'pluginOptions' => [
'autoclose' => true,
'format' => 'yyyy-M-dd'
]
]);
?>
And, the same in frontend is as follows -
use kartik\date\DatePicker;
<?= $form-> field($model, 'ven_established_date')->widget(DatePicker::classname(), [
'options' => ['placeholder' => 'Enter Established date...'],
'pluginOptions' => [
'autoclose' => true,
'format' => 'yyyy-M-dd'
]
]);
?>
Still it works in backend but not in frontend....