I am serializing and passing a date out of my controller using JsonConvert.SerializeObject and sending it to a jQuery UI Datepicker field. Right now the output is like "2015-12-05T00:00:00" and I want it to be in a format of MM/DD/YYYY. My output is available via the AJAX returned data object data.BoardStart and is being attached to #BoardStart but always shows as 12/31/1969.
I've tried moment (and failed) using this code:
var BoardStart = data.BoardStart;
$("#BoardStart").val(moment(BoardStart).format('MM/DD/YYYY'));
Any suggestions? Thanks!