Hi,
I've come across a bug in MiniDateRangeItem used with ListGrid as filter editor.
I've got simple DataSource with DataSourceDateTimeField. Then it's connected to ListGrid with filterEditor enabled. All filterEditor settings are set to default.
When I try to filter using exact date chooser it works fine but when I try to use relative date (even yesterday) all fails with this message on a console:
I've tried to disable this feature but it's enabled by default. When I tried to call allowRelativeDates() all fails again with this message:
Above was of course observed on an MiniDateRangeItem set as filter editor type to a ListGridField.
Everything was observed on latest build from SVN and firefox browser. It works fine on version 2.2 but I cannot set initial criteria on it. Or maybe I'm trying to do this the hard way:
Thanks for any help
Mariusz Goch
I've come across a bug in MiniDateRangeItem used with ListGrid as filter editor.
I've got simple DataSource with DataSourceDateTimeField. Then it's connected to ListGrid with filterEditor enabled. All filterEditor settings are set to default.
When I try to filter using exact date chooser it works fine but when I try to use relative date (even yesterday) all fails with this message on a console:
Code:
20:59:37.028:TMR7:WARN:Log:TypeError: _2.getMonth is not a function Date.getFormattedDateRangeString([object Date], {Obj}) MiniDateRangeItem.mapValueToDisplay(_1=>{Obj}) FormItem.setValue(_1=>{Obj}) Class.invokeSuper(_1=>null, _2=>"setValue") Class.Super(_1=>"setValue", _2=>{Obj}) MiniDateRangeItem.setValue({Obj}) DynamicForm.setValue("date_init", {Obj}) ListGrid._displayNewEditValues(0, undef, {Obj}) ListGrid.setEditValues(0, {Obj}) ListGrid.updateFilterEditor() ListGrid.setFilterValues({Obj}) ListGrid._filter("fetch", {Obj}, null, {Obj}) Canvas.fetchData({Obj}, null, {Obj}) [c]Class.fireCallback(_1=>{Obj}, _2=>undef, _3=>[object Array], _4=>{Obj}) Class._fireActionsOnPause() [c]Class.fireCallback(_1=>{Obj}, _2=>undef, _3=>[object Array], _4=>{Obj}, _5=>true) Timer._fireTimeout("$ir349") unnamed() unnamed()
Code:
20:18:38.163 [ERROR] [pl.lapassion.admin.panel.AdminPanel] Uncaught exception escaped com.google.gwt.core.client.JavaScriptException: (TypeError): self.allowRelativeDates is not a function fileName: http://localhost lineNumber: 61 stack: ()@http://localhost:61 @:0
Everything was observed on latest build from SVN and firefox browser. It works fine on version 2.2 but I cannot set initial criteria on it. Or maybe I'm trying to do this the hard way:
Code:
Date d = new Date(); d.setDate(1); AdvancedCriteria[] criteria = { new AdvancedCriteria("date_init", OperatorId.GREATER_OR_EQUAL , d) }; dataGrid.setFilterEditorCriteria(new AdvancedCriteria(OperatorId.AND, criteria)); dataGrid.fetchData(dataGrid.getFilterEditorCriteria());
Mariusz Goch
Comment