Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-1982

java bug causing wrong localized date format in datebox error message

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Later Later
    • None
    • 6.5.4
    • Components
    • Security Level: Jimmy
    • None

      a JDK bug (http://bugs.sun.com/view_bug.do?bug_id=6369299) causes wrong localized date format in error message of databox, when entering a wrong date for German locale, and possibly others.
      can be reproduced:
      new java.text.SimpleDateFormat("yyyy-MM-dd", java.util.Locale.GERMANY).toLocalizedPattern() -> uuuu-MM-tt (uuuu does not make any sense)

      Sie müssen ein Datum angeben. Format: tt.MM.uuuu
      should be -> Sie müssen ein Datum angeben. Format: tt.MM.jjjj

      since it is a JDK bug ZK might implement a different an exception or use a different localization library here.

      workaround is to override the org.zkoss.zul.Datebox.getLocalizedFormat() on the Datebox component

            jumperchen jumperchen
            cor3000 cor3000
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: