Menu
Hi
I want to have a js to validate the YYYY-MM-DD format. Something like
[code]
var fi = document.priceform;
if((fi.price.value==””)||isNaN(fi.price.value))
{
window.alert(‘Please input valid price’);
fi.price.focus();
return false;
}
But, change it to valid the date format.
If user input 06-13-2007, 30-08-2006, 2005-12-28, 23/12/2001, 2008/07/16 etc all return false.
How can I do it?
Thanks for help