kartik-v / yii2-datecontrol

Date control module allowing separation of date formats for View & Model for Yii Framework 2.0.
http://demos.krajee.com/datecontrol
Other
55 stars 29 forks source link

Widgets missing after installation #130

Closed smohadjer closed 4 years ago

smohadjer commented 4 years ago

Documentation says:

The extension automatically provides three widgets to display and control the date-time inputs. \kartik\widgets\DatePicker or \kartik\date\DatePicker if your format type is date \kartik\widgets\TimePicker or \kartik\time\TimePickerif your format type is time \kartik\widgets\DateTimePicker or \kartik\time\DateTimePicker if your format type is datetime

But after I installed it via composer.json's required object: "kartik-v/yii2-datecontrol": "@dev"

I get the following error:

Invalid Configuration – yii\base\InvalidConfigException The class '\kartik\datetime\DateTimePicker' was not found and is required for DateControl 'datetime' format. Please ensure you have installed one of 'yii2-widgets' OR 'yii2-widget-datetimepicker' extensions. To install, you can run this console command from your application root: php composer.phar require kartik-v/yii2-widgets '@dev' --- OR --- php composer.phar require kartik-v/yii2-widget-datetimepicker '@dev'

Do I need to install required widgets manually?

kartik-v commented 4 years ago

You need to install the yii2-widget-datepicker or yii2-widget-datetimepicker or yii2-widget-timepicker manually. The reason they have not been included is - people/developers have felt the need to use this extension with their own datepicker widgets by setting autoWidget property to false

smohadjer commented 4 years ago

Then Installation and Usage sections in readme should get updated to make this clear. Right now following steps in those two sections only results in errors.