Hello everyone I'm doing a form with dates , use the widget Kartik , but says
Class ' kartik \ widgets \ DatePicker ' not found
Any suggestions? Thank you
my code
use kartik\widgets\DatePicker;
<?php $form = ActiveForm::begin([
'id' => 'viaggio',
/*'enableAjaxValidation' => true,
'enableClientValidation' => false,*/
]); ?>
<?= $form->field($model, 'data_part')->widget(DatePicker::classname(), [
'options' => ['placeholder' => 'Enter ...'],
'pluginOptions' => [
'autoclose'=>true
]
]); ?>
As, error says.
Change
To
Updated Code:
See Usage section of Kartik yii2-widget-datepicker