PHP code example of jenzri-nizar / zf3-bootstrapdatepicker

1. Go to this page and download the library: Download jenzri-nizar/zf3-bootstrapdatepicker library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

jenzri-nizar / zf3-bootstrapdatepicker example snippets


composer 

composer update

'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"
                )
            )

        ));

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