Javascript input mask

The following example shows a information when the data on a input field is completed.

What is your birthday? dd/mm/yyyy

A property data-completed=true is added to the input once the information is completed

Source code

<script src=""></script>
<link rel="stylesheet" href="" type="text/css" />

<input id='date' data-mask='dd/mm/yyyy'> <span id='status'></span>

date.onkeyup = function(e) {
    document.getElementById('status').innerHTML = '';

    if ('data-completed') == 'true') {
        document.getElementById('status').innerHTML = 'Complete';
    } else {
        document.getElementById('status').innerHTML = 'Incomplete';