fixes issue 31705: a date used to filter on a grid dissapears after enter it
authorCarlos Aristu <>
Tue, 15 Dec 2015 18:59:05 +0100
changeset 28143 d85f65dd5246
parent 28142 e7bf20e738da
child 28144 bac3b234b912
fixes issue 31705: a date used to filter on a grid dissapears after enter it

After solving issue 29554 the values of the date filters are completely removed when invoking the clearValue() method. For this reason, in order to prevent the clearing of the date filter it is necessary to call setValue().

This was already controlled when choosing the dates from the date pickers, but not after entering the date with the tab or enter keys or when using the 'Use as Filter' menu option.

Now this cases are controlled also, by calling setValue() on the setSingleDateValue() method.
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-minidaterange.js	Tue Sep 29 12:00:47 2015 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-minidaterange.js	Tue Dec 15 18:59:05 2015 +0100
@@ -476,6 +476,9 @@
     this.singleDateDisplayValue = displayValue;
     this.singleDateMode = true;
     this.setElementValue(displayValue, displayValue);
+    // Use setValue() to prevent the clearing of the filter when reapplying the criteria of the form
+    // See issue
+    this.setValue(displayValue);
   blur: function () {