filsh/yii2-datepicker

Datepicker active form field for yii2 framework

dev-master 2016-03-01 14:04 UTC

This package is auto-updated.

Last update: 2024-11-29 04:41:17 UTC


README

Datepicker active form field for yii2 framework

Dependencies

https://github.com/Filsh/bootstrap-datepicker

Usage

for active form

<?= $form->field($model, 'datetime', [
    'class' => 'filsh\datepicker\ActiveField',
    'options' => ['class' => 'input-group'],
    'inputOptions' => [
        'class' => 'form-control',
        'placeholder' => $model->getAttributeLabel('datetime')
    ],
    'clientOptions' => [
        'format' => 'mm/dd/yyyy'
    ],
    'addon' => [
        'class' => 'input-group-addon',
        'content' => '<span class="flaticon-small58"></span>'
    ]
])->datepickerInput() ?>