Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    SmartGwtEE2.4 DateItem Strange appearance

    Hi,

    I just downloaded smartgwtee-2.4, copied smartgwt.jar, smartgwt-skins.jar, smartgwtee.jar into the class path.

    I used quite a few DateItems in different classes, most of them are fine, but on the Search page, the DateItem seems to be strange, please see the attached screenshot.

    It automatically shows a 'from' date box, and a 'to' date box side by side. There is no difference that i define the DateItems on the Search page from the ones on other page. Even i set dateItemSearchFromDate.setUseTextField(false);, it still shows a text box for date input instead of 3 fields for date, month and year.

    here's the code:
    Code:
    		DateItem dateItemSearchFromDate = new DateItem("from_date", "From");
    		dateItemSearchFromDate.setUseTextField(true);
    		dateItemSearchFromDate.setRequired(true);
    		dateItemSearchFromDate.setValue(new Date());
    
    		final SearchForm form = new SearchForm();
    		form.setNumCols(1);
    		form.setColWidths("*");
    		form.setTitleOrientation(TitleOrientation.TOP);
    		form.setGroupTitle("Search Form"));
    		form.setIsGroup(true);
    		form.setPadding(10);
    		form.setDataSource(dataSource);
    
                    form.setFields(..., dateItemSearchFromDate, ......);
    what have i done wrong?
    Attached Files

    #2
    Sorry, found the problem.

    such 'From' 'To' DateItem is only on a SearchForm, it shows as usual on a DynamicForm

    now i need to find out the use of it.

    Comment


      #3
      If we have DateRangeItem specifically then why should DateItem behave in this way in SearchForm. I think requirement of simple date item on the search form is valid.

      Is this a bug or this is by design?

      Comment

      Working...
      X