JSFiddle - React, Tailwind, and code Playground
by Qwerty_Wasd
HTML
<input id="data" type="text"/>
JavaScript
data.oninput=function() {
let tmp = this.value.replace(/[^\d]/g, '').substring(0,8);
console.log(tmp.match(/(.{2})(.{2})(.{4})/));
tmp = tmp != '' ? tmp.match(/(.{2})(.{2})(.{4})/).slice(1,4).join('/') : '';
this.value = tmp;
}