I have a FilterBuilder that I set the width via "setValueItemWidth(400)" and all the items respect the 400 width except Date and DateTime items (see attached image).
Am I doing something wrong?
Am I doing something wrong?
public FormItem getValueFieldProperties(FieldType type, String fieldName, OperatorId operatorId, ValueItemType itemType, String fieldType) { FormItem formItem = super.getValueFieldProperties(type, fieldName, operatorId, itemType, fieldType); if (type == FieldType.DATETIME) { formItem = new RelativeDateItem(); formItem.setWidth(600); } return formItem; }
DateTimeItem item = new DateTimeItem(); item.setWidth(300); // some appropriate width for your format DateTimeItem.setDefaultProperties(item);
RelativeDateItem relativeDateItemProperties = new RelativeDateItem(); relativeDateItemProperties.setValueFieldWidth(DEFAULT_WIDTH); RelativeDateItem.setDefaultProperties(relativeDateItemProperties); DateTimeItem dateTimeItemProperties = new DateTimeItem(); dateTimeItemProperties.setWidth(DEFAULT_WIDTH); DateTimeItem.setDefaultProperties(dateTimeItemProperties);
fb.setValueItemWidth(DEFAULT_WIDTH);
DateTimeItem dateTimeItemProperties = new DateTimeItem(); dateTimeItemProperties.setWidth(200); DateTimeItem.setDefaultProperties(dateTimeItemProperties);
Comment