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

Make date picker time zone configurable

XMLWordPrintable

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

      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);
          }
      

        Acceptance criteria

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

                Created:
                Updated:
                Resolved:

                  Task DoD