DataTable: Multiple sorting with Date field as first sort #11918
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
Describe the bug
The same issue what Primereact had. link to the issue
DataTable doesn't sort dates correctly. Two completely identical dates are different for table and this bug causes another bug, when you try to sort multiple columns and use date column as primary. Every next column with lower sort priority after date column will not be sorted correctly.
Added stackblitz with example. Just select Year column as primary sort and try to sort Color column as second column. You will not be able to sort cars with date "21.05.1995" by color alphabetically, because table see these dates as different.
As I see, issue in function
Dates should be compared in another way
Environment
Just new angular project with added primeng lib
Reproducer
https://stackblitz.com/edit/github-zpj9hk-hkrmgz
Angular version
14.2.0
PrimeNG version
14.0.2
Build / Runtime
Angular CLI App
Language
ALL
Node version (for AoT issues node --version)
16.13.1
Browser(s)
No response
Steps to reproduce the behavior
Expected behavior
DataTable understand the same dates and correctly sort another column in multisort mode
The text was updated successfully, but these errors were encountered: