use YII and Kartik Widget

Dear All,

I am still newer in YII framework,

When we try create code use YII and Kartik Widget, I have problem with :

Fatal error: Class ‘kartik\yii2daterange\DateRangePicker’ not found in C:\xampp\htdocs\latihan4\protected\views\layouts\main.php

What problem and what must I do



here my code


	use kartik&#092;widgets&#092;DatePicker;

	use kartik&#092;yii2daterange&#092;DateRangePicker;


    echo DateRangePicker::widget([







			'format'=&gt;'Y-m-d h:i A'




It is because you are using a non-existent & invalid namespace for DateRangePicker widget.

You must read the documentation for usage. The right namespace to use is kartik\daterange\DateRangePicker.