tangniyuqi/yii2-laydate

The laydate widget laydate the Yii framework

1.0.3 2018-05-11 12:18 UTC

This package is auto-updated.

Last update: 2024-05-20 09:24:25 UTC


README

add tangniyuqi/yii2-laydate to composer.json

$ composer install
$ php composer.phar require tangniyuqi/yii2-laydate "*"

or add

"tangniyuqi/yii2-laydate": "*"

to the require section of your composer.json file.

Usage

in view:

use tangniyuqi\assets\LayDateAsset;

LayDateAsset::register($this);

or

echo $form->field($model, 'birth')->widget('tangniyuqi\laydate\LayDate', [
        'format' => 'Y',
        'clientOptions' => [
            'type' => 'year', //see http://www.layui.com/doc/modules/laydate.html#type
            'format' => 'yyyy', //see http://www.layui.com/doc/modules/laydate.html#format
        ]
    ]);