Announcement

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

    Advanced Filter - Date/Time range problem

    Hi

    I got problem in SmartGWT 3.1 with AdvancedFilter Date/Time field.

    Example #1 working right:
    I wan to filter the grid using filters above the column headers. I choose Date/Time field and set value range from (05/29/2013 00:00) Today to (05/30/2013 23:59) Tomorrow

    and this is ok when i got 23:59 tommorow, it is fine.

    Example #2 working wrong:
    When I do the same but using advanced filtering and choose this Date/Time field and operator "between" the end date is 00:00 timed.
    That is wrong, I need this to be 23:59 by default.

    Question:
    How to achieve that ?

    #2
    First make sure the field is declared as a "datetime" if you want time-sensitize filtering.

    If you still have an issue, please show how it can be reproduced. The simplest thing is probably to start from a sample.

    Be sure to also provide all other information requested by the forums: *complete* version, browser, server logs, etc.

    Comment


      #3
      In DataSource Fields:

      Code:
      DataSourceDateTimeField dateField = new DataSourceDateTimeField(MessageModel._datefield, messages.messageDSource_datetime());
      		dateField.setType(FieldType.DATETIME);
      		return dateField;
      And in Grid ListGridField:

      Code:
      ListGridField dataField = new ListGridField(MessageModel._datefield, messages.messageDSource_datetime(), 120);
      		dataField.setShowHover(false);
      		dataField.setType(ListGridFieldType.DATETIME);
      		dataField.setCellFormatter(new CellFormatter() {
      			@Override
      			public String format(Object value, ListGridRecord record,
      					int rowNum, int colNum) {
      				DateTimeFormat formDate = DateTimeFormat.getFormat(PredefinedFormat.DATE_TIME_MEDIUM); // DateTimeFormat.getFormat("MM/dd/yyyy HH:mm");
      				String data = "";
      				if (record.getAttributeAsDate(MessageModel._datefield) != null)
      					data = formDate.format(record.getAttributeAsDate(MessageModel._datefield));
      				return data;
      			}
      		});
      		return dataField;

      So, in both I setUp the .DATETIME


      Complete Information:
      Browser: FF 10, Testing it on Jetty (standard for developement in GWT with Eclipse).

      But I do not think that browser can do anything about it, because on Chrome ver 27.0.1453.94 m, I got the same problem.

      I will attach examples (good and bad) to show clearly what is the problem.

      Inside ListGrid filter - it works perfectly.
      Attached Files

      Comment


        #4
        Thanks for the report - we've fixed this in builds dated June 4 and later

        Comment

        Working...
        X