How can I sort my rows which are in yyyy-mm-dd format to be descending in rpivottable output in Shiny r?
I expect rows to be most recent to older dates. I know for example how to sort by month using the below code in the sorter part, but not in date format.
sorters="
function(attr) {
var sortAs = $.pivotUtilities.sortAs;
if (attr == \"ContractCalendarMonth\")
{
return sortAs([\"7\", \"8\", \"9\", \"10\", \"11\", \"12\", \"1\", \"2\", \"3\",\"4\", \"5\", \"6\"]);
}
}"