andrew72ru/yii2-bootstrap-datepicker-mobile

Mobile-first datepicker for Yii2 based on https://github.com/niftylettuce/bootstrap-datepicker-mobile

0.0.2 2016-02-11 12:39 UTC

This package is auto-updated.

Last update: 2024-11-23 01:31:28 UTC


README

Mobile-first datepicker for Yii2 based on https://github.com/niftylettuce/bootstrap-datepicker-mobile

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist andrew72ru/yii2-bootstrap-datepicker-mobile "*"

or add

"andrew72ru/yii2-bootstrap-datepicker-mobile": "*"

to the require section of your composer.json file.

Usage

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

<?= $form->field($model, 'date')->widget(\andrew72ru\datepicker\DatePicker::className(), [
    'options' => [], // Html tag options
    'pluginOptions' => [
        'date-start-view' => 'day',
        'date-format' => 'dd.mm.yy',
        'date' => \Yii::$app->formatter->asDate(time(), 'MM/dd/yy'),
    ],
]); ?>