Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-88563

Unexpected date format setting not in Form

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Duplicate
    • Affects Version/s: 7.0.X, 7.1.X, Master
    • Fix Version/s: Master
    • Labels:
      None

      Description

      DESCRIPTION
      Customer expects a certain date format for different locales, but it is not taking effect.

      In certain locales, the page source shows:

      To confirm that the expected result really should be expected, inspect the page source and search for "datatype-date-format". You'll see some JavaScript like this:

      YUI.add("lang/datatype-date-format_de-DE",function(a)\{a.Intl.add("datatype-date-format","de-DE",
      
      \{a:"So. Mo. Di. Mi. Do. Fr. Sa.".split(" "),A:"Sonntag Montag Dienstag Mittwoch Donnerstag Freitag Samstag".split(" "),b:"Jan Feb M\u00c3\u00a4r Apr Mai Jun Jul Aug Sep Okt Nov Dez".split(" "),B:"Januar Februar M\u00c3\u00a4rz April Mai Juni Juli August September Oktober November Dezember".split(" "),c:"%a, %d. %b %Y %H:%M:%S %Z",p:["VORM.","NACHM."],P:["vorm.","nachm."],x:"%d.%m.%y",X:"%H:%M:%S"}
      
      )},"patched-v3.18.1");

      The date should show periods between numbers , but it shows slashes.

      The customer showed this page source to me on his vanilla bundle, but I did not see it in mine. Regardless, the date is showing as slashes instead of periods.

      STEPS TO REPRODUCE
      1. Create a new site called CEMEX Germany.
      2. Configure the site to have German as default language.
      3. Create a new page called Form.
      4. Add the Form portlet to the page.
      5. Go to the Content -> Forms portlet for the CEMEX Germany site and create a form with just a date field.
      6. Configure the Form portlet to display the form with date field.
      7. To make sure that German locale is applied, add "de" to URL so URL looks like this: http://localhost:8080/de/web/cemex-germany/form
      8. Click on the date field and select a date.
      EXPECTED RESULTS
      Should see a date with periods separating day from month from year. E.g., 22.11.2018
      ACTUAL RESULTS
      We see a date with slashes like this: 22/11/2018
      BRANCH
      Reproduced
      70x-private-7e9bc66f5819c7289058f50ab8956a83cbc90782
      MASTER
      Reproduced
      716b99334bf0fddf2f57cba6358c77163b43d36a

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jonathan.mak Jonathan Mak
                Reporter:
                jonathan.mak Jonathan Mak
                Participants of an Issue:
                Recent user:
                Jonathan Mak
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  1 year, 33 weeks, 2 days ago

                  Packages

                  Version Package
                  Master