Jquery test the validity of a date via:
!/Invalid|NaN/.test(new Date(value))
new Date(dateString)
is the same as Date.parse(dateString)
and uses browser/os locale to parse the string.
im trying to parse DD/MM/YYYY but i get an error because my browser is looking for MM/DD/YYYY. Since my product will be used only by DD/MM people, i want to force this behaviour.
I could write a custom validator, but is it possible to change the browser locale via javascript as well?