Hi Isomorphic,
I would like to know if there is a way to filter on a DateTime column from a ListGrid using the FilterEditor but this only by date.
I try to configure the MiniDataTimeRange, but I do not find a way to specify that the value entered must be only a date.
I saw there is some method in the MiniDateRangeItem to set the format.
The method setDateDisplayFormat(DateDisplayFormat dateDisplayFormat) allow to define the format, but only specify one coming from the enum DateDisplayFormat.
The same thing for method setDateFormatter(DateDisplayFormat dateFormatter)
I would like to know too if there is a way to avoid, when using the calendar pick up, the display of the select item for hours and minutes.
For the filter builder for this list grid I found a way to do this with a RelativeDateItem
Can you help me with that?
Thanks
Julien
I would like to know if there is a way to filter on a DateTime column from a ListGrid using the FilterEditor but this only by date.
I try to configure the MiniDataTimeRange, but I do not find a way to specify that the value entered must be only a date.
Code:
MiniDateRangeItem dateRangeItem = new MiniDateRangeItem(); list.getField("DATETIME").setFilterEditorProperties(dateRangeItem);
The method setDateDisplayFormat(DateDisplayFormat dateDisplayFormat) allow to define the format, but only specify one coming from the enum DateDisplayFormat.
The same thing for method setDateFormatter(DateDisplayFormat dateFormatter)
Code:
MiniDateRangeItem dateRangeItem = new MiniDateRangeItem(); dateRangeItem.setDateFormatter(DateDisplayFormat.TOEUROPEANSHORTDATE); dateRangeItem.setDateDisplayFormat(DateDisplayFormat.TOEUROPEANSHORTDATE); list.getField(DSOperator.LAST_LOGIN).setFilterEditorProperties(dateRangeItem);
For the filter builder for this list grid I found a way to do this with a RelativeDateItem
Code:
RelativeDateItem item = new RelativeDateItem(); item.setDateFormatter(new DateDisplayFormatter() { @Override public String format(Date date) { return Localization.formatDate(date); } }); TimeItem timeItem = new TimeItem(); timeItem.setShowHourItem(false); timeItem.setShowMinuteItem(false); timeItem.setShowSecondItem(false); timeItem.setShowMillisecondItem(false); item.setPickerTimeItemProperties(timeItem); dataSourceField.setEditorProperties(item);
Thanks
Julien
Comment