i create function using event on key up to put “/” inside value from input user using regex but still bug, can someone help me ?
$('#validUntil').on('keyup', function(e){
$(this).val(function(index, value) {
return value
// Add "/" separators:
.replace(/B(?=(d{2})+(?!d))/g, "/")
});
});
for example if i typing 5121 the result must be 51/21