尝试安装 yii2-date-picker-widget 时出错

Error when trying install yii2-date-picker-widget

我是 yii2 框架的新手。当我尝试安装小部件时,收到错误消息。我的命令在这里:

sudo composer require 2amigos/yii2-date-picker-widget:~1.0

错误在这里:

无法将您的要求解析为一组可安装的软件包。

问题 1

- The requested package bower-asset/bootstrap-datepicker could not be found in any version, there may be a typo in the package name.

问题 2

- 2amigos/yii2-date-picker-widget 1.0.x-dev requires bower-asset/bootstrap-datepicker 1.4.0 -> no matching package found.

- 2amigos/yii2-date-picker-widget 1.0.5 requires bower-asset/bootstrap-datepicker 1.4.0 -> no matching package found.

- 2amigos/yii2-date-picker-widget 1.0.4 requires bower-asset/bootstrap-datepicker 1.4.0 -> no matching package found.

- 2amigos/yii2-date-picker-widget 1.0.3 requires bower-asset/bootstrap-datepicker 1.4.0 -> no matching package found.

- 2amigos/yii2-date-picker-widget 1.0.2 requires bower-asset/bootstrap-datepicker 1.4.0 -> no matching package found.

- 2amigos/yii2-date-picker-widget 1.0.1 requires bower-asset/bootstrap-datepicker 1.4.0 -> no matching package found.

- 2amigos/yii2-date-picker-widget 1.0.0 requires bower-asset/bootstrap-datepicker 1.4.0 -> no matching package found.

- Installation request for 2amigos/yii2-date-picker-widget ~1.0 -> satisfiable by 2amigos/yii2-date-picker-widget[1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.0.x-dev].

潜在原因: - 包名称中的错字 - 根据您的最低稳定性设置,该软件包没有足够稳定的版本 有关详细信息,请参阅 https://getcomposer.org/doc/04-schema.md#minimum-stability

阅读 https://getcomposer.org/doc/articles/troubleshooting.md 了解更多常见问题。

有人可以帮助我吗?感谢每一个答案!

您是否尝试启动:

composer global require "fxp/composer-asset-plugin:~1.1.1"

步骤-1 运行 在项目主文件夹的终端上执行此命令 ---->curl -s http://getcomposer.org/installer | php

步骤-2 运行这条命令后安装成功 --->php composer.phar 要求 kartik-v/yii2-widget-datepicker "*"

you can see this contant in advanced->composer.json
 "kartik-v/yii2-widget-datepicker": "*"
If you can't see this, means you missing some...

第-3步 在视图中定义此库-> _form.php 使用 kartik\date\DatePicker;

步骤-4 最后在日期字段

的表单中定义下面给出的代码
<?= $form->field($model, 'xyz_field')->widget(DatePicker::ClassName(),
    [
    'name' => 'check_issue_date', 
   // 'value' => date('d-M-Y', strtotime('+2 days')),
    'options' => ['placeholder' => 'Select issue date ...'],
    'pluginOptions' => [
        'format' => 'yyyy/dd/mm',
        'todayHighlight' => true
    ]
]);?>