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

Make date picker time zone configurable

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Obsolete
    • Neutral
    • None
    • 5.4
    • widgets
    • None

    Description

      Hi guys,

      Is there any possibility that you can make the date picker widget's time zone configurable?

      I looked at the code and the default time zone will always have the browsers' time zone offset attached which (for my project) is not desirable. I would be happy if we could just have a toggle that uses the default time zone, or better make it configurable.

      info.magnolia.ui.form.field.factory.DateFieldFactory#setTimeZone
          private void setTimeZone(DateField popupDateField) {
      
              TimeZone timeZone = TimeZone.getDefault();
              try {
                  int offset = Page.getCurrent().getWebBrowser().getRawTimezoneOffset();
                  timeZone.setRawOffset(offset);
              }
              catch (NullPointerException e) {
                  // don't throw null pointer
              }
              popupDateField.setTimeZone(timeZone);
          }
      

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                Unassigned Unassigned
                christian.hamm@elekta.com Christian Hamm
                Votes:
                1 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Task DoD