在日期中添加 hh:mm:ss 后 P 表排序不起作用

时间:2021-06-17 20:47:40

标签: angular primeng

Sort 在以日期格式添加 hh:mm:ss 之前是有效的,现在在以日期格式添加 hh:mm:ss 之后它不起作用,例如:createdDate=2010/02/02 16:00:00

    cols = [
    {
          field: 'registration_date',
          header: 'Registration Date',
          filterType: 'date',
          filter: true,
          filterMatchMode: 'contains',
          sortable: true,
        }
    ]

    <p-table
      [value]="users"
      [columns]="cols">
      
      .....
      
      
      <td>{{ user?.createdDate| date: 'dd/MM/yyyy hh:mm:ss' }} </td>
    </p-table>

0 个答案:

没有答案