how to check if a string is a valid date format moment code example
Example: moment check valid date
var date = moment("2016-10-19");
var check = date.isValid();
console.log(check);
var date = moment("2016-10-19");
var check = date.isValid();
console.log(check);