Difference between #195 and #196 of
Yii v2 snippet guide

Revision #196 has been created by rackycz on Jun 30, 2020, 2:44:02 PM with the memo:

Composer
« previous (#195) next (#197) »

Changes

Title unchanged

Yii v2 snippet guide

Category unchanged

Tutorials

Yii version unchanged

2.0

Tags unchanged

tutorial,beginner,yii2

Content changed

[...]
```

**Yii2 + Composer**
---
Once composer is installed, you might want to use it to download Yii, but following command might not work:

 
``` php composer.phar create-project yiisoft/yii2-app-basic basic ``` Change it to:
 
``` composer create-project yiisoft/yii2-app-basic basic ```
 
.. and run it. If you are in the desired folder right now, you can use . (dot) instead of the last "word":
 
``` composer create-project yiisoft/yii2-app-basic . ``` **Using DatePicker:**
 
Run this command: 
 
 
```
 
composer require --prefer-dist yiisoft/yii2-jui ```
 
 
and then use this code in your view:
 
```php
 
<?= $form->field($model, 'date_deadline')->widget(\yii\jui\DatePicker::classname(), [ //'language' => 'en', 'dateFormat' => 'yyyy-MM-dd', 'options' => ['class' => 'form-control'] ]) ?>
 
```
 
7 0
4 followers
Viewed: 255 245 times
Version: 2.0
Category: Tutorials
Written by: rackycz
Last updated by: rackycz
Created on: Sep 19, 2019
Last updated: 5 months ago
Update Article

Revisions

View all history