JSFiddle - React, Tailwind, and code Playground

by cornel_gav

HTML

<input/>

JavaScript

$(document).find('input').keypress(function(evt){ 
        if(evt.which==46){
            $(this).val($(this).val()+',');
            evt.preventDefault();
        }
    });