Reputation: 1333
Hy Guys! I am facing a problem regarding datetime field display in Popup. If i add a datetime field to Advanced Search of ProspectLists it get displayed as shown below and works perfectly:
in the custom modules ProspectLists searchdefs advanced_search array it is defined as :
array (
'type' => 'datetime',
'label' => 'LBL_DATE_ENTERED',
'width' => '10%',
'default' => true,
'name' => 'date_entered', ),
but when i try to select a ProspectList from a Prospect List subpanel in Campaigns, the popup that gets displayed render the date field with out dropdown as shown below:
The other problem is this that when i perform search from popup for a specific date it displays nothing.
I am using SugarCRM CE 6.5.11. Any idea how to display dropdown with date field.?
Upvotes: 0
Views: 1328
Reputation: 657
In method SugarFieldBase::isRangeSearchView you should check condition $_REQUEST['action']!='Popup'
File include/SugarFields/Fields/Base/SugarFieldBase.php
I remove it from conditions.
protected function isRangeSearchView($vardef)
{
//return !empty($vardef['enable_range_search']) && !empty($_REQUEST['action']) && $_REQUEST['action']!='Popup';
return !empty($vardef['enable_range_search']) && !empty($_REQUEST['action']);
}
Upvotes: 1
Reputation: 484
I think what you're looking for is the "Ranged Search" attribute.
You can enable it in studio by going to the custom field and checking the "Enable Range Search" checkbox.
Or, you can edit the custom/modules/{module}/metadata/SearchFields.php and add the following to the field in question:
'enable_range_search' => true
Upvotes: 0