I am trying to set up the dates for the report by sticking this code near the top of my MyReport.view.php.
<?php
DateRangePicker::create(array(
"name" => "dateRange",
));
?>
In the MyReport.php I have added these two:
protected function defaultParamValues()
{
$start_date = date('Y-m-d', strtotime('first day of last month'));
$end_date = date('Y-m-d', strtotime('last day of last month'));
return array(
// "dateRange"=>array(date("Y-m-d 00:00:00"),date("Y-m-d 23:59:59"))
"dateRange"=>array(
$start_date,
$end_date
),
);
}
protected function bindParamsToInputs()
{
return array(
"dateRange"=>"dateRange"
);
}
I have copied the inputw directory to my /vendor/koolreport directory. I have also added this to the top of MyReport.php
use \koolreport\inputs\Bindable;
use \koolreport\inputs\POSTBinding;
I am getting an error when I try running this
Type: Error
Message: Class 'DateRangePicker' not found
Filename: /app/assets/MyReport.view.php
Please tell me what I missed doing in setup?