You didn't give any detail about how you're getting those criteria (dynamicForm.getValuesAsCriteria(), relativeDateItem.getCriterion(), etc), but assuming you have a custom form with two relativeDateItems in it, and you call form.getValuesAsCriteria(), you should be able to get the criteria you want with these attributes on your relativeDateItems:
Code:
// produce datetime values
setType("datetime");
// format values as date-only
setDateFormatter(DateDisplayFormat.TOSHORTDATE);
// edit values as date-only - hide the time-editor in the pop-up dateChooser
setShowPickerTimeItem(false);
Note that there are UI components that will manage this range-criteria job for you - see MiniDateRangeItem and DateRangeItem.
Note also that, if you're upgrading your version of SmartGWT, there's no reason to upgrade now to a version that's already superceded by two newer releases. You should upgrade to 5.1 at least, if not 6.0 - 5.0 is less likely to receive complex fixes, or fixes that apply specifically to browser-versions released since 5.0 was released.
Leave a comment: