Answers for "date masking javascript to not allow /"

0

date masking javascript to not allow /

onkeyPress ="
<input
    type="text"
    name="date"
    placeholder="mm/dd/yyyy"
    onkeyup="
        var v = this.value;
        if (v.match(/^\d{2}$/) !== null) {
            this.value = v + '/';
        } else if (v.match(/^\d{2}\/\d{2}$/) !== null) {
            this.value = v + '/';
        }"
    maxlength="10"
}"
Posted by: Guest on July-17-2020

Code answers related to "date masking javascript to not allow /"

Code answers related to "Javascript"

Browse Popular Code Answers by Language