PayPal Style Date input

I am designing a signup form. I am fascinated by PayPal’s signup form where we can only type numeric on date and it automatically seperates them using “/” and we can’t add more numbers. here is link

I would like to know how this is done.
this is what i found while ispecting.

<input type="text" id="dob" maxlength="10" value="" pattern="(0[1-9]|[12][0-9]|3[01])/(([0][1-9])|([1][0-2]))/((1|2)[0-9]{3})" name="dob" required="required" class="hasHelp validate userText" autocomplete="off" autocorrect="off" autocapitalize="off" aria-required="true" data-placeholder-text="DD/MM/YYYY" data-label="Date of birth" data-format="ddmmyyyy" data-today="19/07/2015" data-separator="/" aria-invalid="false">

Source: html5

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.