Running moment.js, 2.2.1
moment(\"2010-10-319\", [\"YYYY-MM-DD\"]).isValid()
... returns true, and the moment object would be
true
If the user is not selecting any date, then it is showing as invalid date. It is wrong, it should show no date or date not selected. To change that in moment.js you can change that to nodate instead of invalid date.