If I choose today or yesterday – nothing.
If I choose last 7 days it includes 7 days, but not today.
If i choose month to date, it includes everything but not today.
https://imgur.com/a/QWtPV61
Mysql column type is datetime
phpgrid code for this column:
$col = array();
$col[“title”] = “Data”; // caption of column
$col[“name”] = “date”;
$col[“editable”] = true;
$col[“width”] = “60”;
$col[“formatter”] = “date”;
$col[“stype”] = “daterange”;
$col[“searchoptions”][“opts”] = array(“initialText”=>”Data Nuo-Iki”);
$col[“searchoptions”][“opts”][“datepickerOptions”] = array(“firstDay”=>”1”, “numberOfMonths”=>2);
$col[“editoptions”] = array(“size”=>20, “defaultValue” => date(“Y-m-d”));
$col[“formatoptions”] = array(“srcformat”=>’Y-m-d H:i:s’,”newformat”=>’Y-m-d H:i:s’);
$col[“editrules”] = array(“required”=>true); // and is required
$cols[] = $col;
Can You help ?
You can edit lib/inc/jqgrid_dist.php and search / replace following:
case ‘bt’ :
$qwery .= “($field >= ‘{$v[‘start’]}’ AND $field <= ‘{$v[‘end’]}’)”;
break;
WITH:
case ‘bt’ :
$qwery .= “($field >= ‘{$v[‘start’]} 00:00:00′ AND $field <= ‘{$v[‘end’]} 23:59:59′)”;
break;
It’s included in latest build as well.