Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sorting by datetime breaks ordering for dates before September 10th 2001 #4519

Open
3 tasks done
HarveyPeachey opened this issue May 4, 2024 · 0 comments
Open
3 tasks done
Labels
bug Something isn't working

Comments

@HarveyPeachey
Copy link

Describe the issue that you're seeing. Any Loom videos or screenshots usually help a lot!

When you have collection items with the datetime field and you sort by that field in the UI and also using sort in the API client GraphQL connection, any collection item fields that have a date older than September 10th 2001, seem to get mistaken for being a more recent collection item in the sort order:

Posts sorted by releaseDate:
firefox_xMgz03SDev

Post test2 with releaseDate September 10th 2001:
firefox_AQs9EJLMd0

Post test3 with releaseDate September 9th 2001:
firefox_ANmUpjPfUf

Reproduction

https://github.com/HarveyPeachey/bug-sort-date-sep-2001

Steps to reproduce

Run npm run dev
Visit http://localhost:3000/admin/index.html#/collections/post/~
Click sort by dropdown and select Release Date (Oldest First)
See test3 being moved to the bottom of the sorted list when it should be at the top

System Info

System:
    OS: Windows 10 10.0.19045
    CPU: (12) x64 AMD Ryzen 5 3600 6-Core Processor
    Memory: 15.74 GB / 31.95 GB
  Binaries:
    Node: 20.11.1 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.22 - ~\Documents\Projects\bug-sort-date-sep-2001\node_modules\.bin\yarn.CMD
    npm: 8.5.2 - ~\AppData\Roaming\npm\npm.CMD
    pnpm: 9.0.6 - ~\AppData\Roaming\npm\pnpm.CMD
  npmPackages:
    @tinacms/cli: ^1.5.34 => 1.5.45
    tinacms: ^1.5.24 => 1.6.3

Validations

@HarveyPeachey HarveyPeachey added the bug Something isn't working label May 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant