Created
October 24, 2016 20:17
-
-
Save anonymous/2428a3e2c6162746e2e7063425b9cac0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<input type="digits" id="datum" class="card-input card-input--full" name="dateofbirth" placeholder="Geburtsdatum" ng-model="card.dob" required card-holder maxlength="10" onkeyup="setPoint();return false;"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
<!-- | |
var punkt = 0; | |
function setPoint(){ | |
var temp = document.getElementById('datum').value; | |
if((temp.length+1) % 3 == 0 && punkt < 2){ | |
punkt += 1; | |
document.getElementById('datum').value = temp + '.'; | |
} | |
} | |
--> | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment