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

Custom date picker in ListGrid's filter problem

$
0
0
Hi,

I use SmartClient Version v10.0p_2014-12-03 (2014-12-03) LGPL Development Only.

I'd like to show my custom date picker in ListGrid's filter.
Code:

public class DatePickerItem extends DateItem {
    ...

    private void init(){
          setAttribute("useTextField", true); // required
    }
}

I set my DataSourceField as
Code:

field.setEditorProperties(customDatePicker);
field.setEditorType(customDatePicker.getClass());

But if I set my DataSourceField as FieldType.DATE I always see default MiniDateRangeItem picker.

I tried to change my DataSourceField's fieldType to another type (CUSTOM, ANY), but I get an error:
Code:

WARN:DateItem:isc_DateItem_0[closedDate]:setItems() called for dateItem with itemList:[TextItem ID:isc_TextItem_7 name:dateTextField] - ignoring, and making use of default date fields
But if I set my DataSourceField as FieldType.CUSTOM and commented required property in my Custom date picker it's work fine.

How can I fix them?

Viewing all articles
Browse latest Browse all 4756

Trending Articles