dimasdevo/laminas-bootstrapdatepicker

Laminas 框架 bootstrap 日期选择器

v1.0.0 2020-06-05 06:24 UTC

This package is auto-updated.

Last update: 2024-09-05 16:34:41 UTC


README

laminas-bootstrapdatepicker

zend framework 3 bootstrap 日期选择器

##安装

  1. 将以下需求添加到您的 composer.json 文件的 "require" 部分中。
composer require jenzri-nizar/laminas-bootstrapdatepicker v1.0
  1. 打开您的命令行并执行
composer update

该模块需要在 config/modules.config.php 中注册

'modules' => array(
    '...',
    'Laminas\Form',
    'laminas\Bootstrapdatepicker'
),

##示例

$this->add(array(
            'name' => 'id',
            'type' => 'laminas\Bootstrapdatepicker\Form\Element\Datepicker',
            'attributes'=>array(
                'class'=>'form-control',
            ),
            'options'=>array(
                'settings'=>array(
                    'id'=>"data",
                    'datepicker'=>array(
                        "format"=>"mm/dd/yyyy",
                        "startDate"=>"-3d",
                        "language"=> 'fr'
                    ),
                    "icon"=>"true",
                    "icon-class"=>"glyphicon glyphicon-th"
                )
            )

        ));

form.phtml

echo $this->datepicker($form->get('id'));

alt tag