Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Pull request Compare This branch is even with tangniyuqi:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
assets
LayDate.php
LaydateAsset.php
README.md
composer.json

README.md

Install

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
        ]
    ]);
You can’t perform that action at this time.