keygenqt/yii2-datepicker

Widget datepicker jquery ui with update style.

Installs: 447

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Type:yii2-extension

1.0.2 2022-07-02 08:09 UTC

This package is auto-updated.

Last update: 2024-03-30 00:23:22 UTC


README

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