Skip to content

Latest commit

 

History

History
40 lines (28 loc) · 696 Bytes

README.md

File metadata and controls

40 lines (28 loc) · 696 Bytes

Yii2 DateTime Widget

Yii2 DateTime Widget

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist oakcms/yii2-datetimepicker "*"

or add

"oakcms/yii2-datetimepicker": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by :

use oakcms\yii2-datetimepicker\DateTimeWidget;

<?= $form->field($model, 'field')->widget(
        DateTimeWidget::className(),
        [
            'phpDatetimeFormat' => 'dd.MM.yyyy, HH:mm'
        ]
    ); 
?>