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

Using short format in Datebox results in the wrong year after ZK-4242 in Thai locale

    Details

    • Type: Bug
    • Status: Open
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: 8.6.2
    • Fix Version/s: None
    • Component/s: Components
    • Labels:

      Description

      Steps to Reproduce

      http://zkfiddle.org/sample/3eq32v6/1-ZK-4242

      1. Open the datebox
      2. Choose 01/01/2443 (AD1900)
      3. Open the datebox again

      Current Result

      It shows "1 ม.ค.2543" (AD2000) in left datebox

      Expected Result

      It shows "1 ม.ค.2443" (AD1900) in both dateboxes

      Debug Information

      https://github.com/zkoss/zk/blob/v8.6.2/zul/src/archive/web/js/zul/db/datefmt.js#L242
      y = 1900, newY = 43, triggers yy to yyyy
      Since ZK stores year in AD internally, it is assumed the year is modified.
      It should take this._localizedSymbols.YDELTA into consideration.

      Workaround

      Use full year format instead (like dd MMM yyyy)

        Issue Links

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              rudyhuang rudyhuang
              Reporter:
              rudyhuang rudyhuang
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: