Cannot get datetime.js plugin to work
Cannot get datetime.js plugin to work

I am trying to use the datetime.js plugin to format my dates, using the example on the plugin page it doesn't appear to be working. What am I doing wrong?
https://jsfiddle.net/pp4nn5L6/
Initializing the second table in that way also doesn't display the pager and other dom elements.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
The columns array is zero index like all arrays in Javascript, so visible column 1 is actually index 0: https://jsfiddle.net/pp4nn5L6/1/ .
The problem you are seeing in that updated example is that Moment doesn't appear to like the time part: https://jsfiddle.net/pp4nn5L6/2/ . I'm not immediately sure why not!
Allan
Could this be a bug with the plugin? The below works fine so moment is parsing it correctly. If I specify that format with the plugin it comes back with invalid date.
alert(moment("2019-04-01T00:00:00", "YYYY-MM-DDTHH:mm:ss").format("Do MMM YYYY"));
Looking at it again I needed to change it to this:
render: $.fn.dataTable.render.moment( 'YYYY-MM-DDTHH:mm:ss', 'D MMM YYYY')
Thanks for the update - you are absolutely correct. I missed that myself. Too much code floating around in my head ;-).
Allan