MicroDroid / vue-materialize-datatable

A fancy Materialize CSS datatable VueJS component.
https://overcoder.dev/vue-materialize-datatable
MIT License
179 stars 67 forks source link

Adding the ability to sort Date strings #67

Open goodnic opened 3 years ago

goodnic commented 3 years ago

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.

MicroDroid commented 3 years ago

Remind me in a few decades to merge this

SkySceneRock commented 3 years ago

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?

MicroDroid commented 3 years ago

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