Skip to content

Commit

Permalink
Gh6065 1 workaround for date+time range filters (#1353)
Browse files Browse the repository at this point in the history
-  not sure about this
metasfresh/metasfresh#6065
  • Loading branch information
metas-rc committed Feb 3, 2020
1 parent 8f10d3e commit bdcab18
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of the
* License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/gpl-2.0.html>.
Expand Down Expand Up @@ -91,6 +91,11 @@ public DocumentFilterDescriptorsProvider createFiltersProvider(
for (final DocumentFieldDescriptor field : filteringFields)
{
final DocumentFilterParamDescriptor.Builder filterParam = createFilterParam(field);
if (filterParam.getWidgetType() == DocumentFieldWidgetType.Timestamp)
{
filterParam.setWidgetType(DocumentFieldWidgetType.LocalDate);
}

if (!defaultDateFilter.hasParameters() && filterParam.getWidgetType().isDateOrTime())
{
defaultDateFilter.setDisplayName(filterParam.getDisplayName());
Expand Down

0 comments on commit bdcab18

Please sign in to comment.