Sorting by Date-and-Time columns does not change the order - only reverts to original order
See original GitHub issueDescribe the bug
Columns with Date and Time only sort to the original order. Requests for Ascending or Descending order appear to be ignored.
To Reproduce Steps to reproduce the behavior:
- Obsidian v0.12.15
- Sortable 0.2.0 installed
- Grab this table:
| Order | File | Dates | Dir |
| ----- | ------------- | ---------------- | ----------- |
| 1 | Table Sorting | 2021-09-29-22:38 | Tables |
| 2 | Unwanted Tags | 2021-09-24-20:28 | Tag Testing |
| 3 | Obsidian | 2021-09-25-20:20 | Tag Testing |
| 4 | Tag File 6 | 2021-09-24-20:11 | Tag Testing |
| 5 | Tag File 5 | 2021-09-22-20:11 | Tag Testing |
| 6 | Tag File 4 | 2021-09-24-19:58 | Tag Testing |
- Sort each of Order, File and Dir columns by each of Ascending, Descending, Original to confirm that plugin is working as expected.
- Sort Dates column by each of Ascending, Descending, Original - it only ever reverts to original order, whilst cycling through all the 3 icons. In other words, sorting by Date-and-Time columns seems broken,
Expected behavior
Sorting on Dates and Times works for ascending and descending orders
Video Demo
Please Note: When I recorded this, I only had Sortable enabled. However, the behaviour is the same when Advanced Tables 0.13.0 is installed and enabled
https://user-images.githubusercontent.com/4840096/135479491-4e92e8b7-92a8-4ecd-a7cf-17d3910eafda.mov
Desktop (please complete the following information):
- macOS Catalina 10.15.7
- Obsidian Version: v0.12.15
- Sortable 0.2.0 installed
Additional context
Can’t think of anything. Just wanted to say “thanks” for a really helpful plugin!
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:10 (6 by maintainers)
Top Results From Across the Web
How to Fix Excel Dates That Won't Change Format - Contextures
How to fix Excel dates that will not change format. Fix dates that end up in the wrong order when sorted. Use built-in...
Read more >Why does my Pandas DataFrame not display new order using ...
df.sort_values(['Total Due']) returns a sorted DF, but it doesn't update DF in place. So do it explicitly: df = df.sort_values(['Total Due']).
Read more >Date and time formating not preserved on close and load ...
After first load of new query it's Ok. The problem starts when you try to change the order of the columns or run...
Read more >Revert to Original Sort Order in Excel
Often times we receive a data set that does not have a column of sequential numbers or dates. If we sort one or...
Read more >16.20 - Unexpected Sort Order When Querying DATE Data ...
Because the sort order is based on UTC time (which is not visible in the column), the time values do not agree with...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I fully agree – minimal tinkering on user’s part!
I will research more into how Wikipedia achieves this, since it’s the main source of inspiration for the plugin.
I appreciate the feedback and I am glad that people find Sortable useful!
Yes, down the line it would be nice for the sorting to “just work” but I totally realise the nature of maintaining open-source projects and not everything can be done - I’ve been there myself on C++ projects…
For now, this is already really useful.