datepicker in yii 2.0

Hello,

I want to select date using a datepicker in yii2.

what is the procedure to do this task.

Just add the following code in your _form.php

<div class="row">

&lt;?php echo &#036;form-&gt;labelEx(&#036;model,'date_of_birth'); ?&gt;


&lt;?php echo &#036;form-&gt;dateField(&#036;model,'date_of_birth'); ?&gt; //date-control provides a control similar to datepicker


&lt;?php echo &#036;form-&gt;error(&#036;model,'date_of_birth'); ?&gt;

</div>

Like if my suggestions are helping you out. :D