question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Sorting by Date-and-Time columns does not change the order - only reverts to original order

See original GitHub issue

Describe 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:

  1. Obsidian v0.12.15
  2. Sortable 0.2.0 installed
  3. 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 |
  1. Sort each of Order, File and Dir columns by each of Ascending, Descending, Original to confirm that plugin is working as expected.
  2. 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:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
alexandru-dinucommented, Sep 30, 2021

down the line it would be nice for the sorting to “just work”

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!

1reaction
claremacraecommented, Sep 30, 2021

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found