Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

upgrading from SmartGWT 3.1 to 4.0 DateRangeFilter Default Value Problem

$
0
0
SmartClient Version: v9.0p_2013-07-16/LGPL Development Only (built 2013-07-16)
Firefox 20.0

I upgraded my system from SmartGWT 3.1 to 4.0 and the ListGrid date filter when it has a default value set start to render with a very strange form, look the print screen.

There is my code:

Code:


Date dataHoje = new Date(System.currentTimeMillis());
Date dataInicial = new Date(dataHoje.getYear(), dataHoje.getMonth(), 1);
Date dataFinal = new Date(dataHoje.getYear(), dataHoje.getMonth() + 1, 1);
                       
CalendarUtil.addDaysToDate(dataFinal, -1);
                       
DateRange dateRange = new DateRange(); 
dateRange.setStartDate(dataInicial);
dateRange.setEndDate(dataFinal);
                       
DateRangeItem dtRangeItem = new DateRangeItem();
dtRangeItem.setValue(dateRange);
                       
final ListGridField dataBaixa = new ListGridField("data_baixa", "Data de Baixa");
dataBaixa.setFilterEditorProperties(dtRangeItem);

There is another way to set a default value for date filter? I need to set a date range as default. In 3.1 my code works and in 4.0 don't.

Attached Images
File Type: jpg printscreen.jpg (44.4 KB)

Viewing all articles
Browse latest Browse all 4756

Trending Articles