u r using one textfield to capture the data?
try this:
if((!window.document.form1.sjoin.value.match(/^[\d]{1,2}[\/|.][\d]{2}[\/|.][\d]{2,4}$/)) || (window.document.form1.sjoin.value.match(/[\/.][\d]{3}$/)))
note form1 is form name and sjoin is the field name. it will allow u to enter date of type:
dd/mm/yy
or
dd/mm/yyyy
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.