PHP code example of smarteng / yii2-daterange-picker
1. Go to this page and download the library: Download smarteng/yii2-daterange-picker 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/ */
smarteng / yii2-daterange-picker example snippets
use jerryteng\daterangepicker\DateRangePicker;
echo DateRangePicker::widget([
'id'=>'filtertime',
'options' => array(
'isTodayValid'=> true,
'startDate' =>'',
'endDate'=>'',
//'magicSelect'=>true,
'autoSubmit'=>true,
'defaultText'=>'/',
//'inputTrigger'=>'input_trigger_demo4',
'success'=>"function(obj) { $('#filtertime').val(obj.startDate + '/' + obj.endDate).change(); }"
)
]);