laminas-bootstrapdatepicker
zend framework 3 bootstrap datepicker
##Installation
- Ajouter l'exigence suivante à votre fichier composer.json. Dans la section:"require"
composer require jenzri-nizar/laminas-bootstrapdatepicker v1.0
- Ouvrez votre ligne de commande et exécutez
composer update
Le module doit être enregistré dans config/modules.config.php
'modules' => array(
'...',
'Laminas\Form',
'laminas\Bootstrapdatepicker'
),
##Exemple
$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'));