PHP code example of keygenqt / yii2-datepicker

1. Go to this page and download the library: Download keygenqt/yii2-datepicker 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/ */

    

keygenqt / yii2-datepicker example snippets


use keygenqt\datePicker\DatePicker;

<?= DatePicker::widget([
        'model' => $model,
        'attribute' => 'updated',
        'language' => 'en-US',
        'dateFormat' => 'php:d-M-Y',
        'clientOptions' => [
            'showOtherMonths' => true,
            'selectOtherMonths' => true,
            'dayNamesMin' => array('S', 'M', 'T', 'W', 'T', 'F', 'S')
        ]
]) 

use keygenqt\datePicker\DatePicker;

<?= $form->field($model, 'date')->widget(DatePicker::className(), [
    'placeholder' => 'Date',
    'icon' => false,
    'selectDay' => false,
    'dateFormat' => 'php:F, Y'
]);