• Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Icon: Major Major
    • 4.0 alpha
    • None
    • None
    • None

      we cannot inherit from Time, because this returns a date object ; while we want a string and we cannot override getValue since it is used internally.

      what we can do is an abstract field wrapper that will wrap a time and the getValue() will do internalField.getSubmitValue()

      do not forget to transmis any configuration.

      The declaration is commented for now in plugin.xml "widgets.others.stringhour" feature

      Here is a code to start

              /**
               * @cfg {String} format=VeryShortTime Can be "VeryShortTime" to have hours and minutes or "ShortTime" to have seconds additionaly
               */
              
              config.format = config.format == "ShortTime" ? "ShortTime" : "VeryShortTime";
              
              config = Ext.apply(config, {
                  value: config.value == Ametys.form.widget.Date.CURRENT ? new Date() : config.value,
                  format: Ext.Date.patterns[config.format],
                  submitFormat: config.format == "VeryShortTime" ? "H:i" : "H:i:s"
              });
      

        1. WEB_StringTime.patch
          3 kB
          Quentin Glinel-Mortreuil

          [RUNTIME-1237] The string-time widget has to be made to replace hour

          Raphaël Franchet made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]
          Raphaël Franchet made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Patch available [ 10005 ] New: Resolved [ 5 ]
          Quentin Glinel-Mortreuil (Inactive) made changes -
          Status Original: Open [ 1 ] New: Patch available [ 10005 ]
          Quentin Glinel-Mortreuil (Inactive) made changes -
          Assignee Original: Quentin Glinel-Mortreuil [ quentin ] New: Raphaël Franchet [ raphael ]
          Quentin Glinel-Mortreuil (Inactive) made changes -
          Attachment New: WEB_StringTime.patch [ 16567 ]
          Raphaël Franchet made changes -
          Status Original: Patch available [ 10005 ] New: Open [ 1 ]
          Raphaël Franchet made changes -
          Assignee Original: Raphaël Franchet [ raphael ] New: Quentin Glinel-Mortreuil [ quentin ]
          Quentin Glinel-Mortreuil (Inactive) made changes -
          Attachment Original: RUNTIME_string_time_widget.patch [ 16489 ]
          Quentin Glinel-Mortreuil (Inactive) made changes -
          Attachment New: RUNTIME_string_time_widget.patch [ 16489 ]
          Quentin Glinel-Mortreuil (Inactive) made changes -
          Attachment Original: RUNTIME_string_time_widget.patch [ 16488 ]

            raphael Raphaël Franchet
            raphael Raphaël Franchet
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: