Skip to content

keygenqt/Datepicker

Repository files navigation

Datepicker

GitHub Packagist Downloads

Yii2 DatePicker jquery ui with style like bootstrap.

Installation

The preferred way to install this extension is through composer.

Either add

"require": {
    "keygenqt/yii2-datepicker": "*"
},

of your composer.json file.

Usage

View:

use keygenqt\datePicker\DatePicker;

<?= DatePicker::widget([
        'model' => $model,
        'attribute' => 'updated',
        'language' => 'en-US',
        'dateFormat' => 'php:d-M-Y',
        'clientOptions' => [
            'showOtherMonths' => true,
            'selectOtherMonths' => true,
            'dayNamesMin' => array('S', 'M', 'T', 'W', 'T', 'F', 'S')
        ]
]) ?>

View:

use keygenqt\datePicker\DatePicker;

<?= $form->field($model, 'date')->widget(DatePicker::className(), [
    'placeholder' => 'Date',
    'icon' => false,
    'selectDay' => false,
    'dateFormat' => 'php:F, Y'
]); ?>

Screenshot

Alt text Alt text

About

DatePicker using standard components yii2.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published