Skip to content

b-table sorting broken for ISO timestamps #6129

Closed
@guillaumesmo

Description

@guillaumesmo

Describe the bug

b-table sorting does not work with data of the following format: "2020-12-03T13:27:42+01:00"

Steps to reproduce the bug

<b-table 
    :items="[{createdOn: '2020-12-03T13:27:42+01:00'}, {createdOn: '2020-12-03T13:26:39+01:00'}]"
    :fields="[{key: 'createdOn', sortable: true}]"></b-table>

Expected behavior

Since the data are strings, it should be sorted.

Versions

Libraries:

  • BootstrapVue: 2.20.0, 2.20.1
  • Bootstrap: NA
  • Vue: 2.6.12

Environment:

NA

Demo link

https://jsfiddle.net/5yex9u1f/

Additional context

This works fine on bootstrap-vue 2.19
see https://jsfiddle.net/bf6r1Lx4/

I think the issue was introduced with #6105

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions