andrew72ru / yii2-bootstrap-datepicker-mobile
Mobile-first datepicker for Yii2 based on https://github.com/niftylettuce/bootstrap-datepicker-mobile
Installs: 123
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- bower-asset/bootstrap-datepicker-mobile: *
- yiisoft/yii2: *
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'), ], ]); ?>