i have set a jquery class:
$(function() {
$( \".datepickerIT\" ).datepicker({
showOtherMonths: true,
selectOtherM
Date.parse
is not recommend to use as there are still many differences in how different hosts parse date strings. [1][2]
I would use moment for date validation.
moment(newDate, 'DD/MM/YYYY', true).isValid()
jsfiddle: http://jsfiddle.net/dw8xyzd4/
[1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse [2] Why does Date.parse give incorrect results?