U4-1493 - 'Sort' in context menu treating creation date as string

Created by Tony Kiernan 17 Jan 2013, 17:24:01 Updated by Sebastiaan Janssen 03 Feb 2016, 17:11:17

Duplicates: U4-2089

When I am trying to use the Sort option in the contexual menu, the date is being treated as a string.

e.g order descending would go:

31/07/2012

28/08/2012

27/09/2012...

Version 4.9.1

3 Attachments

Download missing-gifs.zip

Download sort-by-date.patch

Comments

Jumma Galloway 17 Jan 2013, 20:27:01

I have also noticed this in 4.7.2. Another issue I've encountered is the random order of individual nodes when the 'creation date' sort is used. 17/01/2013 has somehow inserted itself between 28 and 29??


Andy Butland 20 Jan 2013, 22:54:04

Have had a look at these issues and a related one I found. I think they stem not from being treated as a string but because the table column sorting routines only handling US date format.

In the attached patch I've updated to the latest version of the code from http://tablesorter.com (it was tricky to work with currently as the code was partially minified and had no header indicating the version being used). I've made a small customisation to attempt to work out if the user is running a browser with the date or month formatted first, and set to UK or US date accordingly. With this in place, my dates appear to sort correctly now.

Whilst at it, the attached zip file contains a couple of missing gifs that should be saved into Umbraco.Web.UI\umbraco_client\tablesorting\img.


esunxray 21 Jan 2013, 01:08:32

Yes, this is a bug. I have voted it.


Priority: Normal

Type: Bug

State: Duplicate

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions:

Due in version:

Sprint:

Story Points:

Cycle: