Skip to content
Snippets Groups Projects
Commit d97a9c5e authored by Uma's avatar Uma
Browse files

Fixes #1409, #1410 Date range filter selection

parent d022512f
No related branches found
No related tags found
No related merge requests found
......@@ -410,7 +410,18 @@ class CustomView_Record_Model extends Vtiger_Base_Model {
$val[$x] = DateTimeField::convertToDBFormat(
trim($temp_val[$x]));
} elseif($fieldType == 'datetime') {
$val[$x] = $date->getDBInsertDateTimeValue();
if ($advFilterComparator == 'bw' || $advFilterComparator == 'custom' ) {
$dates = explode(' ', $temp_val[$x]);
if(empty($dates[1])) {
if ($x == '0') {
$filterValue = trim($temp_val[$x]). ' 00:00:00';
} elseif ($x == '1') {
$filterValue = trim($temp_val[$x]). ' 23:59:59';
}
}
$date = new DateTimeField($filterValue);
}
$val[$x] = $date->getDBInsertDateTimeValue();
} else {
$val[$x] = $date->getDBInsertTimeValue();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment