I'm getting data that is coming from an ajax call and I would like to format it before inserting it into an input field. However, i'm getting it from mysql in this format 1978-03-94 00:00:00
I've tried a bunch of things with javascripts new Date() but to no luck. I also have bootstrap datetimepicker plugin that I can use, I also tried
var dueDate = $.datepicker.formatDate('MMMM D, YYYY', new Date(taskData.due_date));
but it says cannot .formatDate of undefined. I think it doesnt like that i'm feeding it the time as well.
I would like to format the date to this format April 21, 2016 or 'MMMM D, YYYY' - in datepicker.
Any help is appreciated!