jenzri-nizar / zf3-bootstrapdatepicker
Zend Framework bootstrap 日期选择器
v1.0
2016-10-03 20:34 UTC
Requires
- php: ^5.5 || ^7.0
- zendframework/zend-form: ^2.9.2
This package is not auto-updated.
Last update: 2024-09-14 19:31:21 UTC
README
zf3-bootstrapdatepicker
zend framework 3 bootstrap 日期选择器
##安装
- 将以下需求添加到您的 composer.json 文件的 "require" 部分。
composer require jenzri-nizar/zf3-bootstrapdatepicker v1.0
- 打开您的命令行并执行以下命令:
composer update
该模块应在 config/modules.config.php 文件中注册。
'modules' => array( '...', 'Zend\Form', 'Zf3\Bootstrapdatepicker' ),
##示例
$this->add(array( 'name' => 'id', 'type' => 'Zf3\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'));