Details

    • Type: Bug
    • Status: Done (View Workflow)
    • Priority: Unprioritized
    • Resolution: Resolved
    • Affects Version/s: 2.5.0
    • Fix Version/s: 2.6.0
    • Component/s: Document List
    • Labels:
      None
    • Environment:
      Environment, browser
    • Bug Priority:
      Category 1
    • Sprint:
      ADF Sprint 65, ADF Sprint 66, ADF Sprint 67
    • Story Points:
      3

      Description

      https://github.com/Alfresco/alfresco-ng2-components/issues/3664

      *Type of issue:* (check with "[x]")

      > - [ ] New feature request
      > - [ X ] Bug
      > - [ ] Support request
      > - [ ] Documentation

      *Current behaviour:*
      If you add a format in a datacolumns tag like this:
      ```
      <data-columns>
      <data-column key="entry.properties.sgcc:PRT_TipoPratica" title="Tipo Pratica"></data-column>
      <data-column key="entry.properties.sgcc:PRT_DataSegnalazione" title="Data Segnalazione" type="date" format="dd/MM/yyyy"></data-column>
      <data-column key="entry.createdByUser.displayName" title="Created By"></data-column>
      <data-column key="entry.properties.sgcc:PRT_DataEvento" title="Data Evento" type="date" format="dd/MM/yyyy"></data-column>
      </data-columns>
      ```
      the format being presented is the "medium" (one of the preset from angular pipe)
      . I'm quite sure this used to work in adf 2.3.0 and 2.2.0

      *Expected behavior:*
      Technically based on the format, the exact format representation of the date should change accordingly.

      *Steps to reproduce the issue:*
      Inside an adf-datetable add datacolumns definition and two datacolumn representing the same field, one with a format of your own choice (e.g. format="dd/MM/yyyy") the other without.
      ```
      <data-columns>
      <data-column key="yourFieldDateProperty" title="Data Segnalazione" type="date" format="dd/MM/yyyy"></data-column>
      <data-column key="yourFieldDateProperty" title="Data Evento" type="date" format="dd/MM/yyyy"></data-column>
      </data-columns>
      ```
      Both date will be represented according to the same format (medium) regardless.

      My inkling is that it's due to this piece of code from adf-core.js:
      ```
      DateCellComponent.decorators = [
      { type: Component, args: [{
      selector: 'adf-date-cell',
      template: <ng-container> <span title="{{ tooltip | date:'medium' }}" *ngIf="column?.format === 'timeAgo' else standard_date"> {{ value | adfTimeAgo: currentLocale }} </span> </ng-container> <ng-template #standard_date> <span title="{{ tooltip | date:'medium' }}"> {{ value | date:'medium' }} </span> </ng-template>,
      encapsulation: ViewEncapsulation.None,
      host:

      { class: 'adf-date-cell' }

      },] },
      ];
      ```

      *Component name and version:*
      DateCellComponent in adf 2.4.0.

      *Browser and version:*
      all

      *Node version (for build issues):*
      both with 8.11 and 9.9.0

      *New feature request:*
      <!-- Describe the feature, motivation and the concrete use case (only in case of new feature request) -->

        TestRail: Results

          Attachments

            Issue Links

              Structure

                Activity

                  People

                  • Assignee:
                    jdosti Jenny Dosti [X] (Inactive)
                    Reporter:
                    dvuika Denys Vuika
                  • Votes:
                    0 Vote for this issue
                    Watchers:
                    1 Start watching this issue

                    Dates

                    • Created:
                      Updated:
                      Resolved:

                      TestRail: Cases

                        Structure Helper Panel