Announcement

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

    setAlwayShowEditor not working with DateTime

    Hello,

    I am using a ListGridField of type ListGridFieldType.DATETIME in a ListGrid. I would like the ListGrid to always show the editor, however it doesn't seem to work if the ListGridField is of type DATETIME. When the line is out of focus, the DateTime is displayed as a String which can't be formatted. Here is an example (the first record is out of focus):
    Click image for larger version

Name:	dateTimeAlwaysShowEditorExample.png
Views:	141
Size:	4.6 KB
ID:	260279

    Here is a sample of the code I used to create this ListGrid:

    Code:
    ListGrid listGrid = new ListGrid();
    listGrid.setAlwaysShowEditors(true);
    listGrid.setHeight(300);
    
    ListGridField testDateField = new ListGridField("testDateField", "Test DateTime Field", 200);
    testDateField.setType(ListGridFieldType.DATETIME);
    listGrid.setFields(testDateField);
    
    listGrid.addData(new ListGridRecord());
    listGrid.addData(new ListGridRecord());
    listGrid.setCanEdit(true);
    listGrid.draw();
    Moreover, I realized I obtain the same behavior if I define my own FormItem and set it up using reflection.

    I am using SmartGWT version 12.0 with GWT 2.8.2 and java 11.

    Best Regards

    #2
    The alwaysShowEditors feature has a number of limitations, including not supporting custom FormItem subclasses.
    (We will be revising the documentation to explain what these limitations are).

    It should support the datetime field - that's a bug and we'll be fixing it shortly. We'll follow up here when that issue is addressed

    Regards
    Isomorphic Software

    Comment


      #3
      We've made a change to address this issue. Please try the next nightly build, dated Dec 10 or above
      Regards
      Isomorphic Software

      Comment

      Working...
      X