Uploaded image for project: 'Nuxeo Elements'
  1. Nuxeo Elements
  2. ELEMENTS-1182

Fix regression on nuxeo-date-picker

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.4.7, 3.0.0-SNAPSHOT
    • Fix Version/s: 2.4.27, 3.0.0
    • Component/s: Widgets
    • Release Notes Summary:
      The nuxeo-date-picker element works inside a dom-repeat.
    • Tags:
    • Backlog priority:
      1,000
    • Sprint:
      nxApps 2020 Cycle 5

      Description

      HF07 introduced a regression which makes nuxeo-date-picker not work in a dom-repeat

      This is due to the line

                  this.$.date.set('i18n.firstDayOfWeek', this.firstDayOfWeek);
      

      which sets the date value to null, but I don't know why.

      The problem can be observed with this diff

      diff --git a/elements/document/file/nuxeo-file-edit-layout.html b/elements/document/file/nuxeo-file-edit-layout.html
      index 974397e6..38871fb8 100644
      --- a/elements/document/file/nuxeo-file-edit-layout.html
      +++ b/elements/document/file/nuxeo-file-edit-layout.html
      @@ -78,6 +78,12 @@ limitations under the License.
           >
           </nuxeo-directory-suggestion>
      +     <template is="dom-repeat" items="{{dates}}" >
      +      <nuxeo-date-picker value="{{item.date}}" label="Date de jugement :"></nuxeo-date-picker>
      +    </template>
      +
           <nuxeo-date-picker
             role="widget"
             label="[[i18n('label.dublincore.expire')]]"
      @@ -96,6 +102,11 @@ limitations under the License.
                * @doctype File
                */
               document: Object,
      +
      +        dates: {
      +          type: Array,
      +          value: [{date: '11-03-20'}, {date: '1997-07-16T19:20:30.45+01:00'}],
      +        },
             },
           });
         </script>
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 5 hours
                  5h