This wiki is being moved to a new server and cannot be edited. Please sit tight. Thank you.

Sorting and filtering properties of type::date

From semantic-mediawiki.org

The table is not sorted correct if the property that has type::date. Sorting by click on the headline in this case is alphabetical instead of numerical.

Filtering the table does not work for property that has type::date. Filtering ist alphabetical instead of numerical. Example: Filtering for "6 Januar 2015" shows "16 Januar 2015" and "26 Januar 2015" results aditional.

18:41, 20 January 2015

I have the same Problem. Does anyone knows a solution or a workaround?

Thank you in advance

Michael

09:51, 16 March 2015

You would have to implement such functionality.

14:50, 16 March 2015

And do you know where and how to do it? ;)

Thanks Michael

15:48, 16 March 2015

[0] contains some old/early notes about how sorting can be implemented which certainly needs adaptation but should give a hint as to where to look.

[0] https://gist.github.com/mwjames/3db73525b08a5f0e113e

18:31, 16 March 2015

I still to find a way to implement sorting for values of datatyp DATE. I looked at your sample but did manage to implement it. Maybe someone else found a solution for this?

12:22, 19 March 2015
 
 
 

I have not fully tested this, but in my data, it seems like fields where each value is set, the dates are sorted properly (I have also found it helpful to set times, as dates seem to be calculated for this format based on the server's time zone, regardless of user settings). If there are any blank values in any of the results, they will not sort properly.

For example, if I have two columns with date values, one of which has a value for each date, and one of which is blank, the column with all values set will sort properly, but the column with some blank values set will sort alphabetically (e.g., 1, 12, 2, then alphabetical month).

Filtering will not fix this; the underlying query has to return results with values set for each result in the relevant column for chronological sorting to work.

15:48, 10 September 2015