Announcement

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

    DateField setStartDate

    Hi all,

    i am trying to set start and end date in DateField. I think its not working as expected. When I run my code and open datepicker all dates can be choosen from datepicker, there is no limitation to the date area provided by startdate and enddate. Here´s my code (startDate and endDate are both java.util.Date).

    DateItem item = new DateItem();
    item.setTitle( "dateFrom" );
    item.setTitleAlign( Alignment.LEFT );
    item.setUseTextField( true );
    item.setTextAlign( Alignment.LEFT );

    item.setType( "date" );

    item.setStartDate( startDate );
    tem.setEndDate( endDate );

    I´m using version 1.2

    Does anybody know a solution for that?

    Thanks Rainer

    #2
    same problem. tryed everthing

    here is my code, I use a DynamicForm
    Code:
    mSearchForm = getNewForm();
    DateItem  dateFromField = new DateItem("dateFrom");
    dateFromField.setTitle("From date");
    dateFromField.setUseTextField(true);
    dateFromField.setDisplayFormat(DateDisplayFormat.TOEUROPEANSHORTDATE );
    dateFromField.setStartDate(new Date(System.currentTimeMillis()));
    
    mSearchForm.setFields(dateFromField, ....);

    Comment


      #3
      i'm also facing same problem.
      Is this bug in smartGWT?
      Any workaround for this?

      Comment


        #4
        I'm joining the group of programmers who are facing this problem :)
        Does anyone have a fix?
        Thanks.

        Comment


          #5
          Same effect here, I have tried to narrow down dates in date field with no success. If anybody know how it should be done, please give us short description

          Comment


            #6
            See this post.

            Comment

            Working...
            X