Announcement

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

    Typing dates in Date Range filter in Listgrid broken in Chrome+IE9

    Using:(v8.2p_2012-07-30/PowerEdition Deployment 2012-07-30)

    Hello,

    I have a datetime field in a ListGrid, and have the filter editor enabled. I am using european dates (dd-mm-yyyy hh:mm) throughout the system.

    In the date range editor widget that shows when u click the calendar icon above a datetime column in a listgrid, if the date is set to 12-05-2012, and the user 'backspaces' 12 to change it in 18, it will type 81. Also, using the keyboard to change the year 2012 in 2013 by using backspace and then typing reorders the numbers wrongly, such that the user ends up with like 0213.

    This works fine in Firefox, but in Chrome it doesn't work. Also users reported that the 'day' works in IE9, but the 'year' gets mangled when using the keyboard to type in the input field.


    A few DateUtil calls are made in my system, and the fields are initialized as follows:
    Code:
    public void onModuleLoad() {
    
    DateUtil.setDefaultDateSeparator("-");
    DateUtil.setShortDateDisplayFormat(DateDisplayFormat.TOEUROPEANSHORTDATE);
    DateUtil.setShortDatetimeDisplayFormat(DateDisplayFormat.TOEUROPEANSHORTDATETIME);
    }
    
    public void initGrid(){
     //...
    
    
    //On any given datetime field I use this kind of initialization.
    
    ListGridField startDateField = new ListGridField("startDate",
    			messages.startDate());
    startDateField.setAlign(Alignment.LEFT);
    
    startDateField.setDateFormatter(DateDisplayFormat.TOEUROPEANSHORTDATE);
    DateItem startDateEditor = new DateItem();
    startDateEditor.setUseTextField(true);
    startDateEditor.setUseMask(true);
    startDateEditor.setDateFormatter(DateDisplayFormat.TOEUROPEANSHORTDATE);
    startDateField.setEditorType(startDateEditor);
    }
    Is this a bug?
    Last edited by Sytematic; 15 Aug 2012, 02:20.

    #2
    You need to set the input format to match the display format.

    You probably want to do this system-wide via DateUtil rather than on this specific widget.

    Comment

    Working...
    X