Yii2 datepicker

Hello everyone, I am creating a form and using kartik-v date picker.

But facing this error.

Calling unknown method: kartik\widgets\DatePicker::set Language()

Here is my code:

  echo '<label class="col-xs-4 col-sm-4 col-md-3 col-lg-3 control-label">Date Monitoring Performed:</label>';

  echo DatePicker::widget([

    'name' => 'date_sdv_performed', 

    'value' => date('d-M-Y'),

    'options' => ['placeholder' => ' '],

    'pluginOptions' => [

        'format' => 'dd-M-yyyy',

        'todayHighlight' => true



Please help me.Thanks in advance.

Do you have the following at the top of your script?

use kartik\date\DatePicker;

Yes I have used


but the problem may be with the vendor.I have updated my files through composer.json and now it is working.But I need a small help.Where can I modify the date picker size?As my date picker is getting this type of width.I have attached the screenshot.

Thanks again.

This is my code:


use kartik\widgets\DatePicker;

<?= $form->field($model, 'date_sdv_performed', [

      'template' => "<label class='col-xs-4 col-sm-4 col-md-3 col-lg-3 control-label'>{label}</label><div class='col-xs-6 col-sm-7 col-md-5 col-lg-5'>{input}</div>\n{hint}\n{error}"


      'options' => ['placeholder' => ''],

      'value' => date('d-M-Y'),

      'type' => DatePicker::TYPE_COMPONENT_APPEND,

      'readonly' => true,


      'pluginOptions' => [


        'format' => 'mm/dd/yyyy',

        'todayHighlight' => TRUE,