Uploaded image for project: 'Magnolia UI'
  1. Magnolia UI
  2. MGNLUI-4235

DateField ignores the configured time format for the default value

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 5.5.6
    • 5.5.5
    • None
    • Saigon 103
    • 3

      It is easy to reproduce:
      Configure defaultValue for DateField with time enabled

      fields:
          time: true
          defaultValue: 2017-10-31 12:30
      

      The field displays 2017-10-31 00:00.

      Expected: Display as configured: 2017-10-31 12:30

      Investigate point:

      info.magnolia.ui.vaadin.integration.jcr.DefaultPropertyUtil#createTypedValue(java.lang.Class<?>, java.lang.String)
      
      return new SimpleDateFormat(DateUtil.YYYY_MM_DD).parse(defaultValue);
      => it ignores the configured time format
      

        Acceptance criteria

              ngoc.nguyenthanh Ngoc Nguyenthanh
              sang.ngo Sang Ngo Huu
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD

                    Estimated:
                    Original Estimate - 1.5d
                    1.5d
                    Remaining:
                    Time Spent - 1d 3h Remaining Estimate - 1h
                    1h
                    Logged:
                    Time Spent - 1d 3h Remaining Estimate - 1h
                    1d 3h