Revision #195 has been created by rackycz on Jun 30, 2020, 2:42:24 PM with the memo:
Composer
« previous (#194) next (#196) »
Changes
Title
unchanged
Yii v2 snippet guide
Category
unchanged
Tutorials
Yii version
unchanged
2.0
Tags
unchanged
tutorial,beginner,yii2
Content
changed
[...]
'css' => [],
],
],
],
```
**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:
<?= $form->field($model, 'date_deadline')->widget(\yii\jui\DatePicker::classname(), [
//'language' => 'en',
'dateFormat' => 'yyyy-MM-dd',
'options' => ['class' => 'form-control']
]) ?>