title: How to use datepicker in yii2 basic?
body: <p>I want to use yii2 datepicker but I'm having trouble to implement this. It does not show the date picker and I don't know what is missing in my code. I'm still new in this yii</p>
  
  <pre><code>&lt;?php
  
  use yii\helpers\Html;
  use yii\bootstrap\ActiveForm;
  
  ?&gt;
  
  &lt;div class="row"&gt;
      &lt;div class="col-lg-6"&gt;
  
  &lt;div class="myproj-index"&gt;
  
      &lt;?php $form = ActiveForm::begin(['layout' =&gt; 'horizontal']); ?&gt;
          &lt;? //$form-&gt;field($model, 'periodfrom')
             echo DatePicker::widget([
                 'model' =&gt; $model,
                 'attribute' =&gt; 'periodfrom',
                 'language' =&gt; 'en',
                 'dateFormat' =&gt; 'yyyy-MM-dd',
             ]);
          ?&gt;
  
          &lt;div class="form-group"&gt;
              &lt;?= Html::submitButton('Submit', ['class' =&gt; 'btn btn-primary']) ?&gt;
          &lt;/div&gt;
      &lt;?php ActiveForm::end(); ?&gt;
  
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>Edit</strong></p>
  
  <p>I downloaded this file here <a href="https://github.com/yiisoft/yii2-jui">jui</a></p>
  
  <p>I found out that in my file I have no jui folder under yiisoft folder. My question in appasset how can I declare this files ?</p>
  
  <p><strong>Answer</strong></p>
  
  <p>I fixed it, I downloaded the jquery-ui files then added them to the bower folder in yii2.</p>