zf3-bootstrapdatepicker
zf3-bootstrapdatepicker, (*1)
zend framework 3 bootstrap datepicker, (*2)
Installation
1) Ajouter l'exigence suivante Ă votre fichier composer.json.
Dans la section:"require", (*3)
composer require jenzri-nizar/zf3-bootstrapdatepicker v1.0
2) Ouvrez votre ligne de commande et exécutez, (*4)
composer update
Le module doit ĂȘtre enregistrĂ© dans config/modules.config.php, (*5)
'modules' => array(
'...',
'Zend\Form',
'Zf3\Bootstrapdatepicker'
),
Exemple
$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, (*6)
echo $this->datepicker($form->get('id'));
, (*7)