2amigos / yii2-date-time-picker-widget

Bootstrap DateTimePicker Widget for Yii2
Other
44 stars 35 forks source link

problem in installing widget #9

Closed M-Fares closed 7 years ago

M-Fares commented 9 years ago

using the following command I get the following result: sudo composer require 2amigos/yii2-date-time-picker-widget:~1.0

./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev) Your requirements could not be resolved to an installable set of packages.

Problem 1

Potential causes:

Read https://getcomposer.org/doc/articles/troubleshooting.md for further common problems.

Installation failed, reverting ./composer.json to its original content.

blonder413 commented 9 years ago

I have the same problem

koxu1996 commented 9 years ago

I can not install this widget too.

gohilronak commented 8 years ago

As https://github.com/smalot/bootstrap-datetimepicker is not registered in https://packagist.org/, it is showing this error. We can do following:

  1. Install smalot-bootstrap-datetimepicker#2.3.1 using following command bower install smalot-bootstrap-datetimepicker#2.3.1 This will copy required files in \vendor\bower\smalot-bootstrap-datetimepicker directory.
  2. Clone https://github.com/2amigos/yii2-date-time-picker-widget.git
  3. Remove "bower-asset/smalot-bootstrap-datetimepicker": "2.3.1" from cloned project's composer.json. It should look like this after removing

    "require": {
       "yiisoft/yii2": "~2.0",
       "yiisoft/yii2-bootstrap": "~2.0.0"
    },
  4. Commit changes

    git add .
    git commit -m "remove dependency."
  5. Update yii2's composer.json to following: (Please change url according to path where you have cloned repo.)

    "repositories": [
       {
           "type":"vcs",
           "url":"file://D:\\programs\\xampp\\htdocs\\packages\\yii2-date-time-picker-widget-master"
       }
    ],
    "require": {
       ...
       "2amigos/yii2-date-time-picker-widget": "dev-master"
    },
  6. run composer update --prefer-source

Now datetimepicker widget is installed.

tonydspaniard commented 7 years ago

This issue is quite old (sorry for being unresponsive). I am going to close it as we have already solved what was the subject of it.

ShokhrukhMukhtarov commented 6 years ago

in composer.json write : "minimum-stability": "dev", "prefer-stable": true,

and in CMD composer require 2amigos/yii2-date-picker-widget:"*"