smartgwt: 4.1-p20140908
Hello,
I am trying to change the date shown in a filter editor from a list grid.
Actually, filter editor shows a "smart" date range. For example if I want to filter the range between [08.09.2014 15:00 - 09.09.2014 14:00], filter shows [Sep 8 - 9, 2014].
I want to change this default filter format and show the complete date range. In case of [Sep 8 - 9, 2014] I want to show [08.09.2014 15:00 - 09.09.2014 14:00], so the user knows which is the actually filter criteria.
I have tried to set my own MiniDateRangeItem for my ListGridField, but it doesn't work:
I was able to change the value on a TextItem but when I try with MiniDateRangeItem, it doesn't work.
Any idea?
Thank you in advance!
Hello,
I am trying to change the date shown in a filter editor from a list grid.
Actually, filter editor shows a "smart" date range. For example if I want to filter the range between [08.09.2014 15:00 - 09.09.2014 14:00], filter shows [Sep 8 - 9, 2014].
I want to change this default filter format and show the complete date range. In case of [Sep 8 - 9, 2014] I want to show [08.09.2014 15:00 - 09.09.2014 14:00], so the user knows which is the actually filter criteria.
I have tried to set my own MiniDateRangeItem for my ListGridField, but it doesn't work:
Code:
private void updateField(ListGridField field) {
...
final MiniDateRangeItem mdr = new MiniDateRangeItem();
// Test change default tooltip
mdr.setPrompt("Test");
// Test change initial value
mdr.setValue("Test value");
mdr.addChangedHandler(new ChangedHandler() {
@Override
public void onChanged(ChangedEvent event) {
// Test change value when date range changes
mdr.setValue("New test value");
((TextItem)event.getItem()).setValue("Maybe that...");
}
});
field.setFilterEditorProperties(tf);
}I was able to change the value on a TextItem but when I try with MiniDateRangeItem, it doesn't work.
Any idea?
Thank you in advance!