Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines
It seems that quarter and year preset is missing from Date time picker, you can borrow the preset of Value metric instead:
<?php
use \koolreport\dashboard\inputs\DateRangePicker;
use \koolreport\dashboard\metrics\Value;
class MyRangePicker extends DateRangePicker
{
protected function onInit()
{
$this
->ranges([
"Today"=>DateRangePicker::today(),
"Yesterday"=>DateRangePicker::yesterday(),
"Last 7 days"=>DateRangePicker::last7days(),
"Last 30 days"=>DateRangePicker::last30days(),
"This month"=>DateRangePicker::thisMonth(),
"Last month"=>DateRangePicker::lastMonth(),
"This Quarter"=>Value::thisQuarter(), //This Quarter
"Last Quarter"=>Value::lastQuarter(), //Last Quarter
"This Year"=>Value::thisYear(), //This year
"Last Year"=>Value::lastYear(), //Last year
]);
}
}
Let KoolReport help you to make great reports. It's free & open-source released under MIT license.
Download KoolReport View demo