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

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']
 
]) ?>
7 0
4 followers
Viewed: 275 332 times
Version: 2.0
Category: Tutorials
Written by: rackycz
Last updated by: rackycz
Created on: Sep 19, 2019
Last updated: a year ago
Update Article

Revisions

View all history