Announcement

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

    Enhancement: API ListGridField.setDateDisplayFormatter (DateDisplayFormatter ddf)

    Hi Isomorphic,

    it seems that it is currently (current 4.1d) not possible to define a date format on a per-ListGridField-basis for a datetime-field.

    Currently only the following API is available:
    Code:
    setDateFormatter(DateDisplayFormat dateFormatter)
    My problem is that DateDisplayFormat is just a list of some possible already localized formats (at least the datepart and timepart order), where only the separators are replaced for different locales.

    e.g.:
    Code:
    setDateFormatter(DateDisplayFormat.TOEUROPEANSHORTDATETIME);
    results in:
    de:    15.01.2014 17:40
    en-US: 15/01/2014 17:40
    where as
    com.google.gwt.i18n.client.DateTimeFormat.getFormat(PredefinedFormat.DATE_TIME_MEDIUM)
    would give sth like "2014 Jan 15 17:40" in the second case.
    I think the change should be pretty easy for you, as you already default to the DateUtil.setShortDatetimeDisplayFormatter(), which can return really localized Strings with respect to separators, date-part-ordering and written day/month names. In the best case only some glue code is missing (is that correct? I'm getting to understand the framework more and more.).

    Best regards,
    Blama
Working...
X