row grouping on year
row grouping on year

I have a table of events, each of which has a date (yyyy-mm-dd) associated with it
I would like to apply row grouping, as used in the 'drawCallback' example, but would like to group by year only
I can utilise the date column twice from my ajax source and render one of the date columns to display as a year, but the grouping is not affected
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
worked it out
in my first date column, i returned the year as a substring
then I changed drawCallback to
UPDATE
Better still, for my case there was no need to include the date column twice (I would be hiding the year column anyway) and as i am using the moment library on the page, rather than using a substring, I am better setting the group value in the callback with ...
so i could potentially format the group to include quarter or month or whatever. ;-)
eg