IDEMPIERE-5443 Date Range Filter Component (#1551)
- Fix issue with non-date field
This commit is contained in:
parent
193141324e
commit
c926c05d4e
|
@ -1594,17 +1594,23 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
|
|||
editorFlag.setMode("toggle");
|
||||
div.appendChild(editorFlag);
|
||||
div.appendChild(fieldEditorTo);
|
||||
DateRangeButton drb = new DateRangeButton(editor, editorTo);
|
||||
DateRangeButton drb = null;
|
||||
if (editor.getGridField() != null && DisplayType.isDate(editor.getGridField().getDisplayType()))
|
||||
{
|
||||
drb = new DateRangeButton(editor, editorTo);
|
||||
div.appendChild(drb);
|
||||
fieldEditorTo.setVisible(false);
|
||||
drb.setVisible(false);
|
||||
}
|
||||
fieldEditorTo.setVisible(false);
|
||||
final Component editorRef = fieldEditorTo;
|
||||
final DateRangeButton drbRef = drb;
|
||||
editorFlag.addEventListener(Events.ON_CHECK, new EventListener<Event>() {
|
||||
@Override
|
||||
public void onEvent(Event event) throws Exception {
|
||||
ToolBarButton btn = (ToolBarButton) event.getTarget();
|
||||
editorRef.setVisible(btn.isChecked());
|
||||
drb.setVisible(editorRef.isVisible());
|
||||
if (drbRef != null)
|
||||
drbRef.setVisible(editorRef.isVisible());
|
||||
}
|
||||
});
|
||||
m_sEditorsTo.add(editorTo);
|
||||
|
|
Loading…
Reference in New Issue