Closed KrunchMuffin closed 8 years ago
I think I may have it resolved. I added data-value="2015-12-09 11:00AM"
to each TD and changed the dateformat to match and seems to sort ok. Must be the slash messing it up?
Think I spoke too soon. Not sorting times
<th class="up sorted" data-sortcolumn="2" data-sortkey="2-0" data-dateformat="YYYY-MM-DD h:mmA">Trans. Date<span class="sign arrow up"></span></th>
<td class="sorted" data-value="2015-12-09 9:21AM">12/09/2015 9:21 AM</td>
nevermind. I am a tool. was putting dateformat on the TH not TD. be nice to be able to just have it on the TH tho.
I'm glad you solved it
Anyway, it's a good idea to have possibility to specify the format in header instead of each cell separately
cool.
Is this even supported?
I have moment.js and my TH is like this
<th data-dateformat="MM/DD/YYYY h:mmA">Date Submitted</th>
and a sample TD<td>06/11/2016 11:00AM</td>
you can see it doesn't sort properly