1. Go to this page and download the library: Download jeffwalsh/yii2-date-range 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/ */
jeffwalsh / yii2-date-range example snippets
use kartik\daterange\DateRangePicker;
echo DateRangePicker::widget([
'model'=>$model,
'attribute'=>'datetime_range',
'convertFormat'=>true,
'pluginOptions'=>[
'timePicker'=>true,
'timePickerIncrement'=>30,
'locale'=>[
'format'=>'Y-m-d h:i A'
]
]
]);
use kartik\daterange\DateRangePicker;
echo DateRangePicker::widget([
'model'=>$model,
'attribute'=>'datetime_range',
'convertFormat'=>true,
'startAttribute'=>'datetime_min',
'endAttribute'=>'datetime_max',
'pluginOptions'=>[
'timePicker'=>true,
'timePickerIncrement'=>30,
'locale'=>[
'format'=>'Y-m-d h:i A'
]
]
]);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.