I don't think you need this block here, this part is for parsing the date string into a JavaScript Date object, your custom formatter is returning a formatted date string, not a Date object.  I think you only need to update the toString() function below and let moment  parse the date value and then convert this to a Date object.