SyntaxFix
Write A Post
Hire A Developer
Questions
I recommend to use moment.js. Only providing date to moment will validate it, no need to pass the dateFormat.
var date = moment("2016-10-19");
And then date.isValid() gives desired result.
date.isValid()
Se post HERE