vue-materialize-datatable icon indicating copy to clipboard operation
vue-materialize-datatable copied to clipboard

Adding the ability to sort Date strings

Open goodnic opened this issue 4 years ago • 3 comments

This is probably not the most elegant way of a more generic way to sort, but it should probably do the trick with a minimum amount of changes to your existing code.

Since no tests have been present, I have not added any myself. Therefore, I cannot completely guarantee that this is working 100%. But I think it should.

This should fix #65.

goodnic avatar Jan 02 '21 14:01 goodnic

Remind me in a few decades to merge this

MicroDroid avatar Jan 03 '21 17:01 MicroDroid

I was able to verify that this fix does in fact enhance #65. The two main datetime cases that we use in our code, are "YYYY-MM-DD hh:mm:ss A" and "YYYY-MM-DD." Both of which were sorting correctly on 25 rows of data per page. Is there any chance we could get the code merged in a few decades early? Does there need to be more changes to the code in order to get this approved? Such as updated documentation that includes verbiage to let the user know it will also sort datetime strings, but it still needs to be declared as a string?

SkySceneRock avatar Jan 06 '21 20:01 SkySceneRock

ok I'll try publish in 6h to make it quicker perhaps

MicroDroid avatar Jan 07 '21 03:01 MicroDroid