JSFiddle - React, Tailwind, and code Playground
by muthusamy
HTML
<input id="ccNum" type="text" />
JavaScript
$('#ccNum').keyup(function(e){
if($(this).val().length == 16){
ccNum = $(this).val();
$(this).val($(this).val().substr(12));
$(this).prop('disabled', true);
}
})