Announcement

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

    SmartGWT 3.1p DateItem Bug (Locale PT-BR)

    There's a bug in the DateItem Calendar widget for pt-BR locale.

    The values for column (Thursday) were replaced by column (Wednesday).
    The values for column (Monday) were replaced by column (Friday)

    English to Portuguese Translation: [weekName (shortWeekName)]
    Sunday (Su) = Domingo (Dom)
    Monday (Mo) = Segunda (Seg)
    Tuesday (Tu) = Terça (Ter)
    Wednesday (We) = Quarta (Qua)
    Thursday (Th) = Quinta (Qui)
    Friday (Fr) = Sexta (Sex)
    Saturday (Sa) = Sábado (Sab)

    Using: SmartGWT3.1d (night build of 2012-11-07)
    WebBrowser: Any

    This might be happening in other languages also.
    Attached Files

    #2
    Workaround

    Hi people!

    I already found a workaround for this issue.

    But first, a few explanations:

    1) The problem is NOT in DateItem, it's acutally on the DateChooser used in when the DateItem is edited.

    2) The I18N file is already fixed for pt_BR (check SmartGWTMessages.properties file)

    3) Was found on SmartGWT3.1d (since SmartGWT3.1p does not exists yet)

    Now, for the workaround.
    Fortunally, the DateChooser widget have a very useful method to set default properties.

    Code:
    DateChooser dateChooser3 = new DateChooser();
    dateChooser3.setDayNameLength(3);        
    DateChooser.setDefaultProperties(dateChooser3);
    Now, every DateChooser will render the right values for each day.

    NOTE:
    It might be good to set the default dayNameLength for the DateChooser to 3 instead of 2, so nobody else will have this kind of problem.

    Comment

    Working...
    X