pretty old topic...
Try something like this:
if (!('null' === JSON.stringify(new Date('wrong date')))) console.log('correct');else console.log('wrong');
pretty old topic...
Try something like this:
if (!('null' === JSON.stringify(new Date('wrong date')))) console.log('correct');else console.log('wrong');