moment valid date code example
Example 1: moment check valid date
var date = moment("2016-10-19");
var check = date.isValid();
console.log(check);
Example 2: format a date moment
moment(testDate).format('MM/DD/YYYY');
var date = moment("2016-10-19");
var check = date.isValid();
console.log(check);
moment(testDate).format('MM/DD/YYYY');