It is highly recommended and preferred way to install the Yii 2 extension is through composer but in some rare cases, you may want to install some Yii 2 extensions manually without composer. To do so, please go through the following details on how to use an extension for Datepicker widget

For example to use the yiisoft/yii2-jui extension for Datepicker widget

First of all to install this extension you need to download the yii2-jui zip file from github and extract it to vendor/yiisoft folder.

In root directory, add the following details to the require section of your composer.json file based on instruction available in README.md file

Plain text
1"yiisoft/yii2-jui": "*"

See composer.json file in yii2-jui folder for details on require object which specifies how to make use of this extension

Plain text
1"require": {
2"yiisoft/yii2": ">=2.0.4",
3"bower-asset/jquery-ui": "1.11.*@stable"
4}

Note that yii2 extension should be of minimum 2.0.4 version.

Check for jquery-ui folder in vendor/bower directory.If not, download jquery-ui plugin with the version specified and add in the vendor/bower folder.

Plain text
1"autoload": {
2"psr-4": {
3"yii\\jui\\": ""
4}
5},

If you can see the above code in composer.json file, it means that this extension need to be added in the vendor/composer/autoload_psr4.php. for example like this 

JavaScript
1'yii array(dirname(dirname(__FILE__)) . '/yiisoft/yii2-jui')'>\\jui\\' => array(dirname(dirname(__FILE__)) . '/yiisoft/yii2-jui')

The following example will create an alias for the added extension in vendor/yiisoft/extensions.php

JavaScript
1'yiisoft/yii2-jui' =>
2array (
3'name' => 'yiisoft/yii2-jui',
4'version' => '2.0.5.0',
5'alias' =>
6array (
7'@yii/jui' => dirname(__DIR__) . '/yiisoft/yii2-jui'
8),
9)

Finally you can use yii2 jui datepicker in your php files, for example like this:

HTML / XML
1<?= yii\jui\DatePicker::widget(['name' => 'attributeName']) ?>