Hi all
Im trying to mask a date using the format dd/mm/yyyy.
So far I have:
$("input[name='DOB[]']").mask('12/34/5678', {
placeholder: "__/__/__",
'translation': {
1: {pattern: /[0-3*]/},
2: {pattern: /[0-9*]/},
3: {pattern: /[0-1*]/},
4: {pattern: /[0-9*]/},
5: {pattern: /[1*]/},
6: {pattern: /[9*]/},
7: {pattern: /[0-9*]/},
8: {pattern: /[0-9*]/},
}
});
However, this still allows erroneous input such as 39/19/1999 (where 39 is days and 19 is months).
I cant find a solution anywhere! All the date masking Ive found allow any numbers to be inputted, so mine is a little more strict, but still not enough. Any ideas?
Thanks